on 2008-07-06 1:07 AM, Chris Hanson at [EMAIL PROTECTED] wrote:

> 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.

I don't question Quincey's experience with -[QTMovie
frameImageAtTime:withAttributes:error:], which I haven't looked at. But I
agree with Chris as to the NSEvent methods I describe in another post, and
the similar methods in my own frameworks. In these cases, when the Cocoa
object goes away, its CFType-derived counterpart also goes away.

--

Bill Cheeseman - [EMAIL PROTECTED]
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com

PreFab Software - www.prefabsoftware.com


_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to