buley
buley

Reputation: 29278

Once I enable Zombies, how do I hunt them down?

Continuing some helpful StackOverflow debugging, I have a zombie I need to track down:

2010-08-22 10:18:51.111 AppName[106:307] *** -[CFString release]: message sent to deallocated instance 0x19f3b0

How would one find the variable name or whathaveyou for the 0x19f3b0 Zombie?

Upvotes: 1

Views: 783

Answers (2)

Run the Allocations instrument, and enable "NSZombie Detection" and also turn on "track release/retain". Then as you are running, when the zombie is encountered, it pops up an alert and lets you drill down to explore what code released and retained the original object.

Upvotes: 6

jer
jer

Reputation: 20236

Generally the way I do this is to hunt down the memory reference in the Object allocations instruments tool. It's tedious, but you can usually narrow it down to a few data types, of which usually only one will make sense in your context.

Of course, I only do this if I can't get good info out of the debugger.

Upvotes: 1

Related Questions