I’ve been working on a pretty intense project lately. It really pushed my knowledge and experience of being an iPhone developer. I usually have been pretty good with memory management and preventing crashes in my apps, but this one was using images and core graphics a lot, and was crashing WAY too many times. After nailing down some all of the bugs, i still had one error i just couldn’t wipe out.
I knew what i HAD to do, but I wasnt very sure on how to do it. I knew i had to use the Instruments app that comes with XCode. I’m still a rather new iphone developer, and have used the leak instrument a bit, but after using that, i still couldn’t figure out the leak. So I did what any other programmer does. Stack Overflow.
<tangent>
If you’re a developer and dont know what stack overflow is, you should probably just start a new career now.
</tangent>
Luckily a SO post led me to googling about the “Object Allocations” instrument thats included, and found this wonderful post that led me in the right direction. @markjnet‘s post on zombie use detection was spot on and helped me find my bug within an hour of using the instrument.
Heres the official documentation for the instruments app.
Another helpful post ive read about instruments can be found on The Apple Blog.
Bottom line is, if you want to really optimize your time spent on bug hunting, knowing the Instruments app is crucial!