• 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: Programatically detect if any autorelease pool exists?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programatically detect if any autorelease pool exists?


  • Subject: Re: Programatically detect if any autorelease pool exists?
  • From: Ryan Britton <email@hidden>
  • Date: Wed, 6 Sep 2006 12:25:35 -0700

I don't know if you want to go this route or not, but if you take a look in the Foundation framework, there is a header called NSDebug.h. It defines a category on NSAutoreleasePool that provides a number of methods for checking the pool hierarchy state.


On Sep 6, 2006, at 10:42 AM, John Stiles wrote:

On Sep 6, 2006, at 8:43 AM, Jim Correia wrote:

The only thing creating a "pool of last resort" solves is the messages logged to the console about there being no autorelease pool in place. Since the pool will never be drained, your heap will continue to grow unbounded (until you are swapping like crazy, or run out of address space.)

It ought to be possible to create an NSTimer which drains the "pool of last resort" every few seconds.
This is not that hard to do; I've done something similar in the past when retrofitting old Carbon apps (using Carbon event timers).


_______________________________________________
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

_______________________________________________ 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
References: 
 >Programatically detect if any autorelease pool exists? (From: "Sean McBride" <email@hidden>)
 >Re: Programatically detect if any autorelease pool exists? (From: "Clark Cox" <email@hidden>)
 >Re: Programatically detect if any autorelease pool exists? (From: "Sean McBride" <email@hidden>)
 >Re: Programatically detect if any autorelease pool exists? (From: Jim Correia <email@hidden>)
 >Re: Programatically detect if any autorelease pool exists? (From: "Sean McBride" <email@hidden>)
 >Re: Programatically detect if any autorelease pool exists? (From: Jim Correia <email@hidden>)
 >Re: Programatically detect if any autorelease pool exists? (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Newbie problem with NSMutableArray
  • Next by Date: Re: Getting HTTP headers from a WSMethodInvocationRef
  • Previous by thread: Re: Programatically detect if any autorelease pool exists?
  • Next by thread: Re: Programatically detect if any autorelease pool exists?
  • Index(es):
    • Date
    • Thread