views:

149

answers:

1

Hi

I'm using 'malloc_error _break' to break on double free error.

The stack trace does not lead me to a specific line or object (only to the assembly code).

What I can see is the object address:

...malloc: *** error for object 0xfa1340: double free

How can I find which object this address represents? (0xfa1340)

(I tried to find it in the "ObjectAlloc" tool - but could not).

thanks!

+1  A: 

You want to turn n zombies. What that will do is cause objects that have been dealloc'ed not to be free, but instead they will be swizzled into zombie objects which are still around, that way you can see the message receive.

You can turn it by setting a the environment variable NSZombieEnabled to YES. For info checkout this technote.

Louis Gerbarg