Re: Enabling NSZombieEnabled depending on build configuration.
Re: Enabling NSZombieEnabled depending on build configuration.
- Subject: Re: Enabling NSZombieEnabled depending on build configuration.
- From: "Finlay Dobbie" <email@hidden>
- Date: Fri, 14 Jul 2006 14:33:41 +0100
On 14/07/06, AEC Software - Óscar Morales Vivó <email@hidden> wrote:
I'm relearning Cocoa and have recently discovered the wonders of
NSZombieEnabled for debugging over-released object.
However I find it pretty annoying that it has to be set on the executable at
launch. It would be a lot less prone to trouble if it could be set by build
configuration (i.e. debug can have it on, while it's off for the release
build).
Even in debug builds you probably wouldn't want to run with
NSZombieEnabled for any length of time, as you will consume huge
amounts of memory.
It's a launch time setting, so it makes sense to set it at launch
time, surely? You can create multiple executable targets in your Xcode
project and switch between them, with one of them set to have zombies
and one not, for example.
I believe you can also set it by modifying the global variable (see
NSDebug.h). You'd probably want to do it as the first thing in main(),
but I really don't see much benefit in having to rebuild your
application to turn it on or off (of course you could have multiple
targets, but then you're still building several times when you can
just have multiple executables in the project).
-- Finlay
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden