Breakpoint for iOS app to stop immediately while messaging with zombie object?

I have a memory management error in my iOS application. I installed NSZombieEnabled, and the message "message was sent to the freed object" appears properly in the console. But execution seems to go past the point of the message before the application crashes. At a minimum, this is a way out of some methods. This makes tracking errors difficult.

Is there a way to force execution to stop when a message is sent to a freed object?

+4
source share
2 answers

This blog post says setting a breakpoint at -[_NSZombie methodSignatureForMethod:] will do the trick: http://www.fromconcentratesoftware.com/2007/08/09/nszombieenabled-for-the-debugger-adverse/

+3
source

Have you tried to set a breakpoint at - (void) dealloc?

0
source

All Articles