Re: How Does Autorelease Pool Work?
Re: How Does Autorelease Pool Work?
- Subject: Re: How Does Autorelease Pool Work?
- From: j o a r <email@hidden>
- Date: Mon, 29 Dec 2008 09:27:11 -0800
On Dec 29, 2008, at 9:00 AM, Oleg Krupnov wrote:
I am a newbie to Cocoa Memory Management (have been using GC so
far), and I'd like to make sure that my understanding is correct.
<snip>
- It follows that the actual releasing of objects registered in the
auto-release pool is deferred until the entire call stack is
unfolded back and the control passes to the next event.
All of your assertions up until this point are correct.
In this regard, auto-release pools remind me the garbage collector,
where the time of deallocation is also somewhat indeterminate.
This is not incorrect, but I think that this point can at least be
argued. It's pretty clear that the time of deallocation would have to
be considered at least *less* deterministic in GC. In addition, in GC
you can't (this is of course both and advantage and a disadvantage)
exert the same amount of manual control (using local autorelease
pools, or even sidestepping the user of autorelease).
j o a r
_______________________________________________
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