Find memory leaks in Objective C for iPhone

Yesterday i came across this and thought i must write about an easy way of finding trivial mem leaks.

This article describe how you find memory leaks. You just even need no Instruments. We are using hereĀ  http://clang.llvm.org/StaticAnalysis.html

Just download the mem leaks analyzer: It's namedĀ checker-0.xxx.tar.bz2 where xxx is the actual version.

Just untar it to your home dir. Then go to your project directory and write in the Terminal:

../checker-0.161/scan-build -V -analyze-headers xcodebuild

This will analyze your code and start an Browser with informations about mem leaks it finds. Just try it ! It doesn't change anything on your code or project.

Happy mem leak hunting :)

This entry was posted in iPhone and tagged , , , . Bookmark the permalink.

One Response to Find memory leaks in Objective C for iPhone

  1. JamesD says:

    Thanks for the useful info. It’s so interesting

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>