Re: OmniObjectMeter and multiple NSAutoreleasePools
Re: OmniObjectMeter and multiple NSAutoreleasePools
- Subject: Re: OmniObjectMeter and multiple NSAutoreleasePools
- From: "Timothy J. Wood" <email@hidden>
- Date: Tue, 6 Aug 2002 21:47:51 -0700
On Tuesday, August 6, 2002, at 02:05 AM, Paul Williamson wrote:
Does OmniObjectMeter understand about multiple NSAutoreleasePool
regimes? If I allocate and release my own pool in a loop, in order to
avoid an excessive build-up of autoreleased (but unreclaimed) objects,
will OmniObjectMeter understand?
Yep, assuming I understand what you are saying:
while (condition) {
pool = [[NSAutoreleasePool alloc] init];
... do some stuff ...
[pool release];
}
This should work just fine. I'm not sure what the current situation
is, but it used to be that NSAutoreleasePool instances were on a free
list and the -dealloc method on NSAP (or -release, probably) didn't
trigger the internal memory operation goo that would let you know that
the NSAP was 'deallocated' (whether this is correct or not is
debatable). This would make it look like the NSAP instances were
getting leaked -- once the free list gets big enough, though, this
stops. So, the point of this being, don't worry about NSAP 'leaks'
unless you see a really huge number of NSAP instances marked as leaked
(like a couple hundred would be worrisome).
-tim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.