Iphone – Got memory leak problem when i used NSXMLParser same as SeismicXML Example


I have done xml parsing same as SeismicXML example. But now it gives me memory leak problem.

When i tested SeismicXML with instruments, it also give same memory leak.

In SeismicXML, EarthQuake example is there, it contains all the string and array which come from xml parsing. SO 'Leak' instruments showing all this string and array as leaked objects.

I spent lot time behind this issue. but i couldn't solve yet. If anybody has solve this issue then pls share your review with me.


Best Solution

You may want to download, install and use the CLANG checker tool to understand why your code is leaking memory. This tool (which is already built for Leopard 10.5.x) may sometimes fail to provide the correct answer, but in my personal experience it never failed. I highly recommend it as one of your daily development tools.

You can download it from


Usage it really simple. Take a look at


In practice, you simply build your Xcode project using the command

scan-build -k -V xcodebuild

then, you inspect the resulting output HTML files using the command that will appears as output in your terminal window. These files will give you a detailed explanation of why something is wrong in your code (not just memory leaks).

Kind regards

Related Question