tags:

views:

261

answers:

2

Hi everyone,

if set to on the NSZombie, it tells me that I'm releasing an object which is already released and gives me the memory address, very helpful... BUT I can't see which object it's... because the app stopped working...

any help?

thank you

+3  A: 

You are looking for: malloc_history

http://www.friday.com/bbum/2010/01/10/using-malloc-to-debug-memory-misuse-in-cocoa/

David Sowsy
A: 

malloc_history and my post on the same is certainly a correct answer and one way to do this.

However, it is quite likely you can do the same with Instruments, which is also going to be a bit less low level and more straightforward. Under Xcode's Run menu is Run With Performance Tool. Under that, you'll find Zombies.

Running with that, you should be able to see the type of the object being messaged and the retain/release event history.

bbum
Zombies is greyed out for me under Run With Performance Tool. I already have NSZombies enabled on my executable. Is there something I'm overlooking?
Kevin Elliott