• 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: Enabling NSZombieEnabled programatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enabling NSZombieEnabled programatically


  • Subject: Re: Enabling NSZombieEnabled programatically
  • From: Dave Keck <email@hidden>
  • Date: Sun, 10 Jan 2010 03:41:25 -1000

After checking the CF sources for 10.5
(http://opensource.apple.com/source/CF/CF-476.19/CFRuntime.c), it
would appear that the check for the NSZombieEnabled environment
variable comes in a GCC constructor. Therefore setting the
NSZombieEnabled environment variable from within your app's image
would be impossible (since the constructors for frameworks you link to
are executed before your own). I suppose you could create a framework
or dynamic library (that doesn't link CF directly or indirectly)
expressly for the purpose of setting the NSZombieEnabled environment
variable, but that's a little crazy.

Furthermore, CF couldn't be checking the NSZombieEnabled global
variable since it's defined in the higher-level Foundation framework.
For this reason, zombies could never be enabled for CF objects by
setting the NSZombieEnabled global in NSDebug.h. Which probably isn't
what you want.

These two facts combined means to my knowledge, there's no better way
to enable zombies than to relaunching your app.

(It would appear that 10.6 introduced _CFEnableZombies(), though...)
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Enabling NSZombieEnabled programatically
      • From: Ben Haller <email@hidden>
References: 
 >Enabling NSZombieEnabled programatically (From: Graham Cox <email@hidden>)
 >Re: Enabling NSZombieEnabled programatically (From: "Sean McBride" <email@hidden>)
 >Re: Enabling NSZombieEnabled programatically (From: Jim Correia <email@hidden>)
 >Re: Enabling NSZombieEnabled programatically (From: Graham Cox <email@hidden>)
 >Re: Enabling NSZombieEnabled programatically (From: Quincey Morris <email@hidden>)
 >Re: Enabling NSZombieEnabled programatically (From: "Paul Sanders" <email@hidden>)

  • Prev by Date: Re: programatically updating UI for NSArrayContoller/NSTableView combo
  • Next by Date: Re: if statement causing 32 Byte leak?
  • Previous by thread: Re: Enabling NSZombieEnabled programatically
  • Next by thread: Re: Enabling NSZombieEnabled programatically
  • Index(es):
    • Date
    • Thread