How do you detect memory leaks on iPhone?

后端 未结 13 2383
既然无缘
既然无缘 2020-12-07 15:20

I\'m using the Leaks Instruments feature through Xcode to (try and) find memory leaks. I still haven\'t figured out how to use this program. I click Leaks in the program and

相关标签:
13条回答
  • 2020-12-07 15:55

    Change the view to "Extended Detail" on the instruments panel. This will show you the stack trace of each leaked object after you stop recording and select the leaked object.

    You do see calls into the API, but what you are interested in is finding the last method of your application before the API calls, that is where the leak is.

    A tip: turn on "gather memory contents" in the leaks view. Seeing the object values should also help finding where the problem is.

    You don't want any leaks. 100 leaks is not typical (at least in my apps ;) Typical should be 0.

    0 讨论(0)
提交回复
热议问题