← Introduction.

Changing our course →

 

Debugging memory management problems with NSZombieEnabled

Recently had an EXEC_BAD_ACCES issue, so decided to google, to find what people do in such cases, and found NSZombieEnabled. This thing is great. It helps very much. iPhone development guide says:

To activate the NSZombieEnabled facility in your application: Choose Project > Edit Active Executable to open the executable Info window. Click Arguments. Click the add (+) button in the “Variables to be set in the environment” section. Enter NSZombieEnabled in the Name column and YES in the Value column. Make sure that the checkmark for the NSZombieEnabled entry is selected.

and that's all you have to do. When this variable is set to YES, and you're trying to dealloc anything, runtime changes it's class name to _NSZombie dynamically and memory is not marked as free. So you have something like a repository of deallocated objects, and _NSZombie is watching for all dealocated objects. Everytime you're trying to send a message to a Zombie your console is populated with new message like this:

2009-12-27 11:41:22.476 App[1982:20b] *** -[CFString compare:]: message sent to deallocated instance 0x3da1e30

and it's quit descriptive as you can see. So from now I'll use this feature wherever needed. It's cool.

...

Blog posts that helped me much:

http://www.iphonedevsdk.com/forum/iphone-sdk-development/9781-trouble-setting-nszombieenabled.html http://cocoa-nut.de/?p=16

Comments

Leave a reply »

 
tadalafil forum
October 23rd, 2011 at 02:54
 

My partner and i without doubt realize all you now have reported. In reality, My partner and i shopped through your alternative content articles and I believe you happen to be fully appropriate. Congrats using this web blog.

Generic Viagra
October 30th, 2011 at 13:36
 

greetings web master, your site page’s style is undoubtedly exceptional and then trusting doing it. Your current gives advice will be impressive. Make sure you keep up to date the beneficial do the trick. Meets.

cheapest brand viagra
November 27th, 2011 at 17:40
 

brilliant areas forever, mobile computer got an innovative new person who reads. What would one would suggest regarding a submit that you created a full week some time ago? Any kind of good?

how can you get viagra generic
January 16th, 2012 at 21:34
 

When understand examples of the blogposts with your internet site due to the fact recently, and so i undeniably prefer your manner of posting. I really bookmarked as their favorite them that will my top picks site selection and will be looking to come back soon. Please pay a visit to this site way too and then let me know a impression.

handyortung per gps
January 24th, 2012 at 20:20
 

Pretty website! A touch too spammy yet

Leave a Reply
 
 
 
 
 
 
Twitter (@ExtraVertex)
Twitter ( we are following )
Blank column :-)