Search code examples
instruments

Apple Instruments - Reference Counting


I'm having trouble understanding what's happening here. I am debugging an app because I think it's retaining a class 'DownloadController' after its been used. Using ARC, it should automatically release the object when the Reference Count is zero.

So in instruments it looks like

Live

From that I assume, that 48 bytes have are still 'live' and being used, correct?

So I try to find what is causing this object to be retained, when its no longer needed, by using reference count traces.

Ref Cnt

At the bottom it says, RefCt is zero; so why has the object not been released? How can I debug further, why it hasn't been released?


Solution

  • These ARC anomilies were being caused by NSZombieEnabled, after removing this argument it started freeing objects.