Finding the line of memory leak in Instruments

家住魔仙堡 提交于 2019-12-21 04:56:16

问题


I am new to Instruments in iOS. I am trying to find the memory leak in instruments and using Xcode 4.5.2 and following this tutorial: http://soulwithmobiletechnology.blogspot.sg/2011/04/how-to-check-memory-leaks-in-xcode-4.html.

I am able to find the memory leak and able to press the arrow to go to history of the memory leak item. But when i double-click any of them, it doesn't show the line it is causing the memory leak.

The image is like this:

What am i doing wrong? Need some guidance... Thanks..


回答1:


I had trouble finding it at first too. Here's how:

  1. Select the Leaks instrument (obviously).
  2. Show the "Extended Detail" Pane by clicking the Icon in the toolbar that toggles it from the right.
  3. Select Your leaked item from the list.
  4. Double Click on the entry there you see your Application Name and/or one of your Classes, which has a User Icon next to it to take you to the problematic code. (There can be more than one)

Double clicking that (4), will take you directly to the file, and line of code in question:



来源:https://stackoverflow.com/questions/14705349/finding-the-line-of-memory-leak-in-instruments

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