On Tue, Aug 31, 2010 at 9:45 AM, David Duncan <david.dun...@apple.com> wrote: > > On Aug 31, 2010, at 9:34 AM, Roland King wrote: > >> Of course I now have to ask if I *were* doing it .. what's the issue? > > Under GC -retain, -release, -autorelease and -retainCount are no-ops > (objc_msgSend doesn't even dispatch them). > >> Is it that autorelease doesn't do anything so the CF type never gets the >> CFRelease() call it would do from a real -release? What does >> CFMakeCollectable() do if you are memory managed .. nothing? These are >> things I've not had to worry about but you piqued my interest. > > > CFMakeCollectable() does nothing under Retain/Release and calls CFRelease() > under GC. The typical idiom for dual mode code is to do > "[NSMakeCollectable(foo) autorelease]" which will ensure the object will be > released under both RR and GC (NSMakeCollectable is identical to > CFMakeCollectable except for its return value being id instead of void*).
To backup what David states review... <http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcCoreFoundation.html> _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com