Xcode shows memory leak, but Instruments does not Xcode shows memory leak, but Instruments does not xcode xcode

Xcode shows memory leak, but Instruments does not


It's a extremely annoying Xcode bug or maybe a feature :) if you see it from Apples perspective.

I did encounter it today and here is how to solve it.

  1. Press the application name where you set the scheme (next to the stop button in xcode)

  2. Select 'edit scheme'

  3. Select 'run' (left side of the pop-up window)

  4. Select 'options' (top part of the pop-up window)

  5. uncheck the 'enable backtrace recording' (last selection you need to scroll down)

The downside is that backtrace will be disabled if you crash. So I guess you want to toggle that switch depending on what you want to focus on.

In the 'profile' scheme the backtrace is not enabled therefore you did only see the memory leak when using the debug navigator (run scheme) and not in instruments (profile scheme).

/Anders.


After much research on Google and other forums, this seems to be a bug with XCode.


Updating previous text after more tool usage experience.

enter image description here

After some recent experiments using the Instruments in Xcode 7.2.1, I noticed that the Leaks chart does not always work. After killing the process of the Instruments and the simulator, run again ... the chart appeared. There seems to be intermittent problem and not found the cause yet.

enter image description here