Patrick Patrick - 6 months ago 65
Objective-C Question

xcode Tools: Memory Leaks

In the Memory Leaks tool in XCode 7 what do those crosses in the timeline represent (and the grey shape with the minus)? I could not find this in the documentation and they appear regularly on the timeline.

enter image description here

I get a long lists of leaked object (this is a big project developed in the last years). Should this list be always empty, or it's normal to get some leaks in a running app, or does this implies that it's bad written code?

enter image description here


I can answer the first question. The Leaks instrument checks for memory leaks every 10 seconds initially. If the Leaks instrument finds new leaks since the last check, it shows a red symbol with an X in it (the red crosses). The gray symbol with a minus sign means the Leaks instrument has found memory leaks, but no new leaks since the last check.

The goal is to get the Leaks instrument to show a green symbol with a checkmark. That means no leaks were found.


Green: no leaks 
Gray: no new leaks 
Red: new leaks