Re: NSAutoreleasePool: how does it really work?
Re: NSAutoreleasePool: how does it really work?
- Subject: Re: NSAutoreleasePool: how does it really work?
- From: David Remahl <email@hidden>
- Date: Tue, 18 Mar 2003 19:15:43 +0100
IMHO, NSAutoreleasePool works fantastic, the only thing it is
unfortunately
missing is capability to show, say, class of the offending object.
Say, in some super-debug mode. Say, representing zero refcount as 1
000 000,
and raising with details on every instance asked to release being 1
000 000
or less. Or deallocate instances when their recount reaches, say, - 1
000
000.
PoolBombSquad mode. Finding all possible information about the crasher.
Such pool accidents killed a lot of my time and nerves few months ago,
and
now, though rarely, such things do happen... Multiplied by thousands of
newbies this time grows into lost, sad and nervous millennia...
Wow, is there a solution within our reach? It would be a nice little
tool...
Yes, there is a solution. You may continue to call it PoolBombSquad
mode, but in reality it's called NSZombieEnabled. It is an environment
variable. You should activate it in your Executable in PB by adding an
environment variable with that name, and the value "YES".
What the feature does, is that it leaves deallocated objects around, in
sort of a zombie mode. When they are then messaged, for example by
NSAutoreleasePool, you will get an informational message about the
receiver (it's class, address etc).
Read more in <Foundation/NSDebug.h>.
/ Rgds, David Remahl
_______________________________________________
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.