Reputation: 590
I have turned on "Enable Zombie Objects", and I am getting the following:
2012-08-06 13:43:05.452 MyApp[234:707] *** -[MyViewController respondsToSelector:]: message sent to deallocated instance 0x97a6c50
I would like to know: is there an easy way to find out which object is sending the message to MyViewController? MyViewController is a delegate for a number of different things, and I would like to figure out which thing is sending the message.
Upvotes: 0
Views: 220
Reputation: 25318
You can start your app with Instruments, it will show you the complete life cycle of the object. Where it was retained and released, and where it turned into a zombie. Simply start Instruments and pick the zombie template and then just use your app. Afterwards, just look at the neatly formatted output it generates
Upvotes: 3
Reputation:
You can request a stack trace in the debugger to see which functions called which other functions. For example, with GDB, you can see something like:
(gdb) bt
0x01234567 in main()
0xabcdef12 in UIApplicationMain
0xdef01234 in - [AppDelegate application:didFinishLaunchingWithOptions:]
etc.
Upvotes: 4