Finding Messages Sent to Deallocated Objects
Find messages sent to deallocated objects using the Instruments Zombies template. A message sent to a deallocated object can cause your app to crash.
Open the Zombies template.
Choose your app from the Choose Target pop-up menu.
Click the Record button and exercise your app until a Zombie Messaged dialog appears.
Click the focus button to the right of the message text in the dialog.
Open the Extended Detail pane and double-click the zombie event type in the object history table.
Double-click the Responsible Caller in the stack trace to display the responsible code.
The Instruments Zombies template substitutes an object of type
NSZombie for objects that are released to a reference count of zero. When a
NSZombie is messaged, a Zombie Message dialog appears. Clicking the focus button to the right of the message in the Zombie Detected dialog displays the complete memory history of the overreleased object.
The screenshot shows the Instruments template targeting the SplitViews app, a Zombie Detected dialog, the Detail pane table view displayed by the focus button in the Zombie Detected dialog, and the stack trace with the responsible caller selected.