“Build and Analyze” is your Friend

by byamabe on June 3, 2010

While tracking down a memory leak in my latest app, which looks to be a known problem with the simulator, I ran into someone suggestion to run the “Build and Analyze” (B&A) command from the Build menu in Xcode. Being an Xcode novice, I had never tried this before. Well, I would just like to thank Apple for including this feature because it helped me to fix an intermittent crashing problem, better understand Objective-C reference counting, clean up my code, and just have a better sense of satisfaction about my code.

Coming from the Java world, B&A seems to be a lot like Coverity which can do static analysis on your code except B&A is a lot faster. I’m not sure how often I’ll run B&A, but it seems like a good idea to clean the project and run B&A after every feature and/or major code restructuring. If you’re not already using B&A regularly I highly recommend you do so.

Previous post:

Next post: