简体   繁体   中英

Finding the line of memory leak in Instruments

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..

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:

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM