I’ve seen suggestions saying to set NSZombieEnabled to true while debugging. What is NSZombie? Is it a framework? A setting?
I’ve seen suggestions saying to set NSZombieEnabled to true while debugging. What is NSZombie?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s a memory debugging aid. Specifically, when you set
NSZombieEnabledthen whenever an object reaches retain count 0, rather than being deallocated it morphs itself into anNSZombieinstance. 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 over-release/autorelease problems without advanced tools or painstaking needle in haystack searches.The name is a fairly obvious play on the fact that objects are normally considered “dead” when they reach retain count 0. With this setting, they continue to exist in a strange half-life – neither living, nor quite dead. Much like real zombies, except they eat rather fewer brains.