views:

193

answers:

3

When using the "Gather Leaked Memory Contents" of the Leaks Instrument, it seems to give me only the hex contents of an object, rather than showing me the ASCII string beside it (like every other hex dump in the world ever). Worse still, this box is un-selectable, I cannot even copy it into a decent hex editor for a string view.

Is there a reason for such insanity?

+1  A: 

Because the point of the Leaks instrument is to show you where things are being leaked, which is far more useful than what. When you know where and when things are leaked, go back to Xcode, set breakpoints, and step through. If what's being leaked is important to why, then you can see that in the debugger in real time, rather than in Instruments after the fact in aggregate.

cdespinosa
A: 

That answer is BS. If there's an option called gather the contents, you think you can see the contents. You kill yourself trying to find the contents. Then someone says that's not the point. Are you debugging the app? Do you know the point? Contents would show you EXACTLY what object is being leaked, which is awfully helpful if you're staring at code for three hours and still can't figure out what's leaking.

The Pres
A: 

One way to find the contents is by running leaks from the command-line. Find the process name of your running app (you can use a tool such as from Activity Monitor or top), then in Terminal run:

leaks myprocessname

It should print out not only the address, size, and type of data, but the contents as well if it can. You can also, of course, copy the result from there into whatever hex editor you fancy.

Aaron Thompson