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 (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 arch...@mail-archive.com

Reply via email to