Re: NSEnumerator retaining objects?
Re: NSEnumerator retaining objects?
- Subject: Re: NSEnumerator retaining objects?
- From: John Stiles <email@hidden>
- Date: Wed, 9 Mar 2005 16:05:56 -0800
On Mar 9, 2005, at 3:59 PM, Zach Wily wrote:
I have (potentially) about 10 million of these things. Having
10,000,000 objects stuck in an autorelease pool removes the ability
to immediately release them (meaning about 600+ MB of memory) and I'm
stuck with an autorelease pool that's at least 40MB in size
(10,000,000*sizeof(id)).
You could create and release your own autorelease pool every few
thousand iterations...
I can see why a reasonable developer would object to 10,000,000
unnecessary [[thing retain] autorelease]. That's a noticeable
performance blip and basically scrubs over memory in a very
cache-thrashing way.
OTOH, wasn't it determined that NSEnumerator doesn't do
retain/autorelease unless it's the last object in the set? So the other
9,999,999 objects shouldn't be affected, theoretically.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden