Re: Programatically detect if any autorelease pool exists?
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