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*). -- David Duncan _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
