How to use Instrument in iOS

喜欢而已 提交于 2019-12-12 10:13:29

问题


I have run my app with instrument and i m getting a memory leak but i dont know at which point that memory leak is happening.

How will i know at which point memory is leaking.


回答1:


It says responsible library is quartzcore, and it is only 16 bytes. As long as it is not in the app and the OS is causing the same, you cant do much about this. I would recommend you to ignore this.

If you are facing issues, check the allocation tool -> Live bytes section and check if memory is shooting up when you are selecting a lot of images at the same time.




回答2:


Check out this article "Actually finding a memory management error with Instruments", from the big nerd ranch. Creating "heapshots" is a good way to start narrowing down the code parts that show no obvious memory management errors at first glance. But as ACB stated already, if a system library is leaking (rare case) there's not much you can do about it. But most of the time the memory issue is always in your apps' code somewhere! :-)




回答3:


I can see from your screenshot that your app is already running in your device/simulator and you are trying to run it again with instrument, try to close your app completely from device and then start it again with instrument.

You can read more details about Xcode instrument from Apple.developer InstrumentsUserGuide

Also I have found another good tutorial about this in Raywenderlich blog

Another good documents is here



来源:https://stackoverflow.com/questions/13600260/how-to-use-instrument-in-ios

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