How to determine where this memory leak is coming from?

ぐ巨炮叔叔 提交于 2019-12-11 04:07:30

问题


How can I determine where this memory leak is coming from in my code? It doesn't reference anything but the "main" function in my application.


回答1:


It looks like you're trying to use NSZombieEnabled and leaks at the same time. These two diagnostic techniques don't work together--NSZombieEnabled makes all deallocated objects just stick around, so they will appear as leaks.

Simply turn off NSZombieEnabled and you should be set for this case.




回答2:


As Joey said; you can't use Zombie Detection and Leak Detection at the same time.

You have Zombie Detection enabled in the Object Alloc instrument.

Turn off zombie detection and Leaks will work again.

The Leaks instrument really should detect this situation, thus I filed <rdar://problem/7139389> and have included a link to this article in the bug report.



来源:https://stackoverflow.com/questions/1270284/how-to-determine-where-this-memory-leak-is-coming-from

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!