Please help me track down an iOS memory leak. Thanks!
I\'m using xCode 4.0.1 and I tried to activate NSZombie to track a memory leak, but it doesn\'t seems to work as be
You can see where it was allocated if you do this:
First, that is a malloc
block, not an object. Zombies won't work (and would never have worked in prior versions either).
How many times does that leak happen? Once? Don't worry about it. Once per stream? file a bug -- that isn't in your code from what you have posted so far (unless your code is calling strdup
, which is certainly possible but atypical in most iOS apps that aren't making heavy use of third party libraries... are you?)
In any case, unless it is leaking 100s and 100s of 32 byte allocations across the runtime of your app, don't worry about it (but please do file a bug).
As Valkio said, you can grab the stack trace of the allocation from gdb (or from Instruments) directly.