Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enabling NSZombieEnabled depending on build configuration.



On 2006-07-14 14:33, Finlay Dobbie said:

>> 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.

Well, I think that depends.  If you have a fast machine with lots of
RAM, and your app is not inherently a huge memory consumer, then I think
the value of catching memory bugs early with NSZombieEnabled on all the
time is well worth it.  On the other hand, I have apps that use GiB of
memory, and are pretty much useless with NSZombieEnabled.  So it depends.

Xcode makes it easy to enable Guard Malloc, launch with shark, etc.  I
for one would like to see using NSZombie/CFZombie/MallocScribble/etc
made just as easy.  I suspect many Mac developers do not even know about
these great env vars!

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden

References: 
 >Enabling NSZombieEnabled depending on build configuration. (From: AEC Software - Óscar Morales Vivó <email@hidden>)
 >Re: Enabling NSZombieEnabled depending on build configuration. (From: "Finlay Dobbie" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.