• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OmniObjectMeter and multiple NSAutoreleasePools
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >OmniObjectMeter and multiple NSAutoreleasePools (From: Paul Williamson <email@hidden>)

  • Prev by Date: Re: Accessor methods and (auto)release: conclusion
  • Next by Date: enough of accessors - how about private method naming conventions in the real world?
  • Previous by thread: OmniObjectMeter and multiple NSAutoreleasePools
  • Next by thread: OmniObjectMeter and PB/gdb
  • Index(es):
    • Date
    • Thread