Re: Autorelease/Retain/Release
Re: Autorelease/Retain/Release
- Subject: Re: Autorelease/Retain/Release
- From: Daniel Staal <email@hidden>
- Date: Tue, 24 Jul 2007 22:27:15 -0400
--As of July 24, 2007 10:18:22 PM -0400, Tim Davis is alleged to have said:
As Charlton put it, the autorelease pool is sometimes quirky as to when
it actually gets rid of objects, so I would actually be better off
releasing it myself, and keeping the autorelease uses to things like
looping through an XML doc or creating one (in this example anyways).
--As for the rest, it is mine.
Probably the best way to think of it is that you release something when you
are finished with it, and you autorelease when you are giving it to someone
else. Autorelease tells the system you are finished, but keeps it around
just long enough for someone else to say 'I need that'.
Daniel T. Staal
---------------------------------------------------------------
This email copyright the author. Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes. This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------
_______________________________________________
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