1

I have noticed these memory leaks when I used Memory Graph:

NSMutableArray memory leaks

But I cannot manage to debug those memory leaks. The strange thing is that there is only one object in the graph when I open one of the leaks. The object is NSMutableArray.

Should not there be at least two objects pointing at each other? How can I debug this leak?

Simon Moshenko
  • 2,028
  • 1
  • 15
  • 36
  • Can you give the code for the class which is causing this? Is this also from profiling in instruments? – George Jan 22 '20 at 16:29
  • @George_E I cannot give you the code, because I have no idea what is causing it. – Simon Moshenko Jan 23 '20 at 10:02
  • In instruments, it should show you where the issue is coming from. For some reason your symbols are missing, so you just get the `0x...` memory locations. It should show a class name for example. – George Jan 23 '20 at 12:07
  • Turn on the “malloc stack” diagnostic, and then you will see the stack trace where this object was allocated. See https://stackoverflow.com/questions/30992338/how-to-debug-memory-leaks-when-leaks-instrument-does-not-show-them/30993476#30993476. – Rob May 21 '20 at 18:06

0 Answers0