Tag Archives: debugging

Preprocessor debugging goodies

Ok, I admit it – my favorite debugging tool is still NSLog (and print statements in general). ┬áIn this post I’ll mention some useful debug logging techniques you can use with the help of preprocessor macros. Logging method calls It’s as simple as this: #define PrintName NSLog(@”%s”, __FUNCTION__) Add this macro (with a semicolon) to […]

feeling retained?

This is a quick tip for figuring out why an object is not being released when you expect it to: For the object in question, override retain and release to log their activity. Don’t forget that alloc is always called first, so if you see an equal number of retain and release logs, this means […]