• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Garbage Collection, Core Foundation, and toll-free bridging
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Garbage Collection, Core Foundation, and toll-free bridging


  • Subject: Garbage Collection, Core Foundation, and toll-free bridging
  • From: Marco S Hyman <email@hidden>
  • Date: Wed, 5 Aug 2009 20:11:36 -0700

I assume that just because I can toll-free bridge something
between core foundation and NSFoo I still have to worry about
CFretain/CFrelease in a GC app.  Correct?

Example:

Assume image is an CGImageSourceRef.

    NSDictionary *metadata =
	(NSDictionary *) CGImageSourceCopyPropertiesAtIndex(image, 0, NULL);
    ....
    CFRelease((CFDictionaryRef) metadata);

or alternately

    NSDictionary *metadata = (NSDictionary *)
	NSMakeCollectable(CGImageSourceCopyPropertiesAtIndex(image, 0, NULL));

Is that correct?

/\/\arc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Garbage Collection, Core Foundation, and toll-free bridging
      • From: Dave Keck <email@hidden>
    • Re: Garbage Collection, Core Foundation, and toll-free bridging
      • From: Rob Keniger <email@hidden>
    • Re: Garbage Collection, Core Foundation, and toll-free bridging
      • From: Bill Bumgarner <email@hidden>
References: 
 >[iPhone] networking-is it crippled on the simulator? (From: James Lin <email@hidden>)
 >Re: [iPhone] networking-is it crippled on the simulator? (From: Dave Camp <email@hidden>)
 >Re: [iPhone] networking (From: James Lin <email@hidden>)
 >Re: [iPhone] networking (From: glenn andreas <email@hidden>)
 >Re: [iPhone] networking (From: James Lin <email@hidden>)
 >Re: [iPhone] networking (From: Luke the Hiesterman <email@hidden>)
 >Re: [iPhone] networking (From: Shawn Erickson <email@hidden>)
 >Re: [iPhone] networking (From: glenn andreas <email@hidden>)
 >Re: [iPhone] networking (From: Kyle Sluder <email@hidden>)

  • Prev by Date: FYI - new debug & profile libraries are out
  • Next by Date: General approach to networking/server problem?
  • Previous by thread: Re: [iPhone] networking
  • Next by thread: Re: Garbage Collection, Core Foundation, and toll-free bridging
  • Index(es):
    • Date
    • Thread