Re: Release vs. autorelease
Re: Release vs. autorelease
- Subject: Re: Release vs. autorelease
- From: Scott Ribe <email@hidden>
- Date: Mon, 12 Jan 2009 14:16:54 -0700
- Thread-topic: Release vs. autorelease
> When i have more than one pool, where
> does the auto-released memory lands in ?
The most recently created pool.
>What am i missing ?
Sometimes you want to create your own pool so that you can periodically free
up memory *during* some long batch processing, rather than waiting for the
framework-supplied pool to free memory *after* your processing is done. Note
that if you're only working with your own objects, you can possibly just
alloc and release them immediately, but if anything in your loop calls a
framework convenience constructor, then you'll be building up a pile of
auto-released objects that won't be released until the pool is drained...
This is a rare need, BTW. Usually one pool is just fine--that's really the
point.
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
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