Re: Guidelines for Cocoa frameworks supporting garbage collection?
Re: Guidelines for Cocoa frameworks supporting garbage collection?
- Subject: Re: Guidelines for Cocoa frameworks supporting garbage collection?
- From: Chris Hanson <email@hidden>
- Date: Sat, 05 Jul 2008 22:07:21 -0700
On Jul 5, 2008, at 3:52 PM, Quincey Morris wrote:
The other thing worth noting is that, when GC is enabled, any CF
object that is documented to be *returned* already autoreleased from
a frameworks function is actually returned with a reference count of
1, so you still need to call CFMakeCollectable yourself in that
case, even though you wouldn't follow it with a call to autorelease
like you would in Chris's examples.
I don't believe this is the case. Can you give an example of a
framework method that's documented to return an autoreleased CF object?
I would assume that the result of such a method has already had
CFMakeCollectable called on it, making doing so unnecessary.
-- Chris
_______________________________________________
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