了解Xcode中的仪器,测试泄漏 [英] Understanding Instruments in Xcode, testing for leaks

查看:172
本文介绍了了解Xcode中的仪器,测试泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用仪器,这是一个很好的小工具来测试内存分配/泄漏以及所有好东西。但是我很迷惑于它的工作原理... Ive寻找解释如何使用它的教程,但没有教程解释如何处理它。



我我会尝试解释一下:每当我运行我的Xcode应用程序时,我都会设置它,仪器跟踪一切。但是仪器记录的东西对我来说是没有意义的。



发现一个泄漏,之后它开始泄漏字节。它表示泄漏的对象是_NSCFString和其他类似的东西。这是一个截图





我的问题是,我该如何解释?如果有一个教程解释这个,请留下一个答案,或解释给我。

解决方案

最好的了解如何使用仪器的方法是观看iOS开发基础/高级/基础视频以及WWDC会议视频。



您可以找到一个列表苹果公司的开发视频访问,需要iOS开发者帐户,通常通过iTunes托管。



iPhone基金会开发视频




  • 会话916 - 乐器入门



WWDC 2009:




  • 会话414 - 使用乐器的iPhone性能优化



WWDC 2010: strong>




  • 会话304 - 乐器的新功能

  • Se

  • 会话311 - 使用仪器进行高级内存分析

  • 会话309 - 利用仪器进行高级性能分析
  • >


WWDC 2011:




    <会议310 - 乐器中的新功能
  • 会议312 - 使用乐器的iOS性能和功耗优化



WWDC 2012:




  • 会话409 - 学习乐器



    • WWDC 2014:




      • 会话418 - 改进您的使用乐器的应用程序



      WWDC 2015:




      • 会话412 - 深度分析



      WWDC 2016:




      • 会话411 - 深度系统跟踪

      • 会话418 - 在乐器中使用时间分析器


      I just started using Instruments, a nice little tool for testing memory allocations/ leaks and all that great stuff. But I'm pretty confused at how it works... Ive looked for tutorials explaining how to work with it, but no tutorials explained what to do with it.

      I'll try to explain this: I have it set up to whenever I run my Xcode app, Instruments tracks everything. But the stuff that instruments record makes no sense to me.

      There was one leak discovered, and after that it started leaking bytes. It says the leaked object is _NSCFString and some other stuff like that. Here is a screenshot

      My question is, how do I interpret this? If there is a tutorial out there that explain this, please leave as an answer, or explain it to me.

      解决方案

      The best way to learn how to use Instruments is to watch the iOS Development Essential/Advanced/Foundation videos as well as the WWDC session videos on the topic.

      You can find a list at Apple's Development Video Access which will require an iOS Developer Account and are usually hosted through iTunes.

      iPhone Foundation Development Videos:

      • Session 916 - Getting Started with Instruments

      WWDC 2009:

      • Session 414 - iPhone Performance Optimization with Instruments

      WWDC 2010:

      • Session 304 - What's New in Instruments
      • Session 306 - Automating User Interface Testing with Instruments
      • Session 309 - Advanced Performance Analysis with Instruments
      • Session 311 - Advanced Memory Analysis with Instruments

      WWDC 2011:

      • Session 310 - What's New In Instruments
      • Session 312 - iOS Performance and Power Optimization with Instruments

      WWDC 2012:

      • Session 409 - Learning Instruments

      WWDC 2014:

      • Session 418 - Improving Your App with Instruments

      WWDC 2015:

      • Session 412 - Profiling in Depth

      WWDC 2016:

      • Session 411 - System Trace in Depth
      • Session 418 - Using Time Profiler in Instruments

      这篇关于了解Xcode中的仪器,测试泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆