What is NSZombie?

It’s a memory debugging aid. Specifically, when you set NSZombieEnabled then whenever an object reaches retain count 0, rather than being deallocated it morphs itself into an NSZombie instance. Whenever such a zombie receives a message, it logs a warning rather than crashing or behaving in an unpredictable way. As such, you can debug subtle … Read more

How to enable NSZombie in Xcode?

Environment variables are now part of the “scheme”. To edit the scheme and turn on zombies: In the “Product” menu, select “Edit Scheme”. Go to the “Run Foo.app” stage in the left panel, and the “Arguments” tab on the right. Add NSZombieEnabled to the “Environment Variables” section and set the value to YES, as you … Read more

How to enable NSZombie in Xcode?

Environment variables are now part of the “scheme”. To edit the scheme and turn on zombies: In the “Product” menu, select “Edit Scheme”. Go to the “Run Foo.app” stage in the left panel, and the “Arguments” tab on the right. Add NSZombieEnabled to the “Environment Variables” section and set the value to YES, as you … Read more