There is a simple way to enable NSZombie if you are dealing with XCode version 4 through implementation of the following simple step:
Please click on the scheme drop down bar named Product choose -> edit scheme -> arguments tab and then add NSZombieEnabled in the Environment Variables column and YES in the value column...Now you are done with enabling NSZombie to find bugs in program.
When you run your app,you get an error message where the app crashes setting NSZombie state to enabled,but originally before enabling NSZombie,you might find it difficult to find out what's exactly wrong,like crash at autorelease pool,gdb break currently using objective-c,BAD_ACCESS errors etc... By enabling NSZombie you can find what is exactly the problem such as improper deallocation and trying to re-access,or improper release of memory etc..The errors may be of the following kind:
-[ExampleProgramViewController alertView:didDismissWithButtonIndex:]: message sent to deallocated instance 0x7068f70