I learned today about the NSZombieEnabled environment variable (this is its correct name, and not NSZombiesEnabled as stated in Hillegass’ book). If you set it to YES, whenever you try to send a message to a deallocated object you will get a message like this in the console:
message sent to deallocated instance 0xe02b790
And the debugger is automatically started. This can be very useful for debugging memory management problems. Instead of a crash, you get an informative error message.