zoukankan      html  css  js  c++  java
  • Finding Leaks Using Instruments

    Finding Leaks Using Instruments

      The Instruments application can be used to find leaks in both OS X and iPhone applications.

      译:Instrument可以检测OSX和iOS程序的内存泄露。

      To find leaks, create a new document template in the application and add the Leaks instrument to it. The Leaks instrument provides leak-detection capabilities identical to those in the leaks command-line tool.

      译:Instrument Leak模板就是leaks命令行工具。

      The Leaks instrument records all allocation events that occur in your application and then periodically searches the application’s writable memory, registers, and stack for references to any active memory blocks. If it does not find a reference to a block in one of these places, it deems the block a “leak” and displays the relevant information in the Detail pane.

      译:Leaks记录所有的的内存分配,然后周期地根据当前变量可访问内存来检查内存泄露。

      In the Detail pane, you can view leaked memory blocks using Table. In Table mode, Instruments displays the complete list of leaked blocks, sorted by size. Selecting an entry in the table and clicking the arrow button next to the memory address shows the allocation history for the memory block at that address. Selecting an entry from this allocation history then shows the stack trace for that event in the Extended Detail pane of the document window. In Outline mode, the Leaks instrument displays leaks organized by call tree, which you can use to get information about the leaks in a particular branch of your code.

      需要注意,Instrument中Leaks 图像中没显示并不代码没有泄露,一切在tableview中为准。Leaks查内存泄露还是很准的,亲测。

  • 相关阅读:
    今天入住博客园,希望有个好的开始,自己在这边可以学习成长
    浅谈 C# ref 和 out 的使用方法
    类之间的几种关系
    VB6.0 文件日志读取
    基于NPOI的Excel导入和导出功能
    WebService的创建,发布与调用
    C# OfType 的使用
    Vb6.0 文件日志记录
    ZipInputStream
    [转载]遗传算法入门
  • 原文地址:https://www.cnblogs.com/tekkaman/p/2921144.html
Copyright © 2011-2022 走看看