iPhone memory leak detection using clang

| | Comments (0) | TrackBacks (0)
One of the most common problems in iPhone development is memory leaks.  I found the Performance tool offered by Apple to be pretty useless at finding memory leaks.  A much better tool is clang.  It found 23 valid memory leaks in my first iphone app. 

It does static analysis of the objective-c and produces a great report of any memory leaks.  It's on the about page of the clang.livm.org site.  After downloading and installing in the /Developer directory, add the path to the /etc/paths file, ie
>sudo vi /etc/paths

To use it, from the command-line, always do a clean by
>xcodebuild clean

Then do the build
>scan-build -k -v xcodebuild

0 TrackBacks

Listed below are links to blogs that reference this entry: iPhone memory leak detection using clang.

TrackBack URL for this entry: http://www.pacificspirit.com/cgi-bin/mt/mt-tb.cgi/250

Leave a comment

About this Entry

This page contains a single entry by Dave Orchard published on March 5, 2009 6:05 PM.

iPhone threading and screen refreshes success was the previous entry in this blog.

Vancouver real estate picks up is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Categories