IOS libsystem_c.dylib Troubleshoot NSDombie memory issue not working

Please help me track iOS memory leak. Thanks!

I am using xCode 4.0.1 and I tried activating NSZombie to track memory leak, but it does not seem to work like xCode 3.x

I cannot find out where the memory leak comes from, as Instruments does:

Leaked Object → GeneralBlock-32 Address → 0x4c8600 Size → 32 bytes Responsible library → libsystem_c.dylib Responsible frame / caller → strup

At this moment I do not know. If I use Tools with NSZombie in the correct way with xCode 4, since it does not show the NSZombie parameter when I press "i" for more information, under the Leak option on the left.

OBSERVATION . My iPhone application plays a live mms / wma stream, as well as wma time-limited files. A leak occurs only with the final wma file, but works fine when I play from a streaming source without a finite time.

+8
ios memory-leaks objective-c instruments nszombie
source share
2 answers

The first is the malloc block, not the object. Zombies will not work (and would never work in previous versions).

How many times does this leak occur? Once? Do not worry about it. Once per stream? create an error - this is not included in your code from what you have published so far (if your code does not call strdup , which is certainly possible, but atypical in most iOS applications that do not use intensive third-party libraries ... you?)

In any case, if it does not leak 100 and 100 from 32 byte allocations during the execution of your application, do not worry about it (but please make a file with an error).

As Valkio said, you can directly grab a stack trace from gdb (or from tools).

+10
source share

You can see where this was highlighted if you do this:

  • Go to product -> Edit Scheme -> Run (Debug) -> Arguments.
  • Add this to your environment variables: MallocStackLoggingNoCompact
  • Install YES
  • Run and let it crash.
  • type in the console (gdb) info malloc 0x4c8600 or any other address.
+5
source share

All Articles