On Aug 12, 2008, at 22:52, Ken Ferry wrote:
In general, you don't need to CFRetain an object to keep it alive while it's on the stack. The fact that it's on the stack is enough. If this wasn't true, there'd be a race, since the collector might destroy the object before you retained it.
Unless I misunderstand your point, its being on the stack will only keep it alive if CFMakeCollectable has already been called on it. In a case where you're given a CF-type object that you don't own, I don't think you can assume that. If it has not been made collectable, it's being kept alive by a non-zero retain count, or by having being autoreleased, either of which will keep it alive long enough for you to retain it.
_______________________________________________ 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]