On Feb 17, 2013, at 11:50 AM, Matt Neuburg wrote:

> On Sat, 12 Jan 2013 11:13:13 +0000, Mike Abdullah <cocoa...@mikeabdullah.net> 
> said:
>> 
>> The allocations instrument can show you all presently allocated objects. 
>> Find the object(s) you're interested in from that list and you can view its 
>> history of being retained and (auto)released, to figure out what is still 
>> holding onto it.
> 
> Actually, Instruments is no help in figuring out "what is still holding onto 
> it". That's not entirely unreasonable, since in a very real sense *no* object 
> is "holding onto" anything; there are only messages and the object's own 
> internal retain count.

Well, you can't figure out what object is holding onto another object, but you 
can figure out which _body of code_ is holding onto an object.

> But it sure would be nice if Instruments did give more info about this, so 
> that one could try to track down which retains are balanced by which releases 
> (and which retains, therefore, are unbalanced).

Well, Instruments can no more divine which release balances which retain as it 
can know what object might "hold" what other object.

> A mere retain count over time, along with a call stack, just doesn't quite 
> cut it somehow.

Well, you have to analyze the retain/release history yourself, but all of the 
necessary information is there.

What I would appreciate is a GUI to assist the developer in keeping track of 
what his analysis determines.  For example, dragging releases in the history 
onto retains in the history to match them up, visually showing both that those 
retains and releases are presumed to be balanced and, when requested, showing 
the link between them.  For example, balanced retains and releases could be 
dimmed or struck through.  Eventually, only the unbalanced retains would stand 
out.

Regards,
Ken


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to