I’m getting this message when I run my app:
*** __NSAutoreleaseNoPool(): Object 0xadf5e50 of class __NSDate autoreleased with no pool in place - just leaking
I understand that I need to create an NSAutoreleasePool at the start of the thread that this is happening on, but I’m not sure where in my code this is happening. Is it possible to set a breakpoint that will be hit when the object in question is autoreleased?
You could set a symbolic breakpoint on __NSAutoreleaseNoPool and see which thread you’re on when you hit it. This can be done using the UI at the bottom of Xcode’s Breakpoint Navigator, or on the GDB command line if you prefer, by entering the command: break __NSAutoreleaseNoPool