Re: Reference counting events not always tracked in Instruments
Re: Reference counting events not always tracked in Instruments
- Subject: Re: Reference counting events not always tracked in Instruments
- From: David Dunham <email@hidden>
- Date: Tue, 16 Nov 2010 22:08:38 -0800
On 16 Nov 2010, at 20:20, Ken Thomases wrote:
>> I'm trying to track down potential heap bloat using the Allocations instrument. I consistently see a couple objects still around after I close their window (and a breakpoint on their -dealloc isn't hit). I'd love to see who is holding a reference, but the history for the specific object is always blank. I can see the stack for its creation, but that's it.
>
> Is it possible the history is correct? The object is created and then never retained or released after that? That would be consistent with what you've described.
No. For one thing, there was no creation event shown.
> Are you doing something weird with the threads in your app, specifically their stacks? Like, are you allocating your own stacks for the threads? Are you reseating the threads onto a different stack from where they started (which is highly unlikely, except for certain very specific purposes)? Are you using the ucontext(3) routines to implement "fibers" or coroutines?
The allocation was in the main thread. I think there were retains and releases in a thread.
If it matters, we use a lot of frameworks. But sometimes history was there.
> Are you overriding -retain, -release, or -autorelease?
I did start overriding one of those (can't recall) but only to log (and I called super). But I was actually seeing this for a number of objects (while others had a nice history).
I eventually managed to figure out my leak, no thanks to the history part of Allocations. (The fact that the object showed up as still live was correct and useful.)
David Dunham A Sharp, LLC http://a-sharp.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden