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

前端 未结 3 577
说谎
说谎 2021-01-27 10:42

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.

3条回答
  •  太阳男子
    2021-01-27 11:25

    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

    http://clang.llvm.org/StaticAnalysis.html

    Usage it really simple. Take a look at

    http://clang.llvm.org/StaticAnalysisUsage.html#BasicUsage

    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

提交回复
热议问题