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

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

问题描述

我刚开始使用 Instruments,这是一个很好的小工具,用于测试内存分配/泄漏和所有很棒的东西.但我对它的工作原理感到非常困惑......我寻找了解释如何使用它的教程,但没有教程解释如何使用它.

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.

我将尝试解释这一点:我将它设置为每当我运行我的 Xcode 应用程序时,Instruments 都会跟踪所有内容.但是仪器记录的东西对我来说毫无意义.

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.

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

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.

推荐答案

学习如何使用 Instruments 的最佳方式是观看 iOS/macOS Development Essential/Advanced/Foundation 视频以及有关该主题的 WWDC 会议视频.

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

您可以在过去的 WWDC 会议视频中找到一个列表来观看.它们不需要开发者帐户即可访问.

You can find a list at past WWDC Session Videos to watch. They do not require a developer account to access.

iPhone Foundation 开发视频:

  • 第 916 节课 - 仪器入门

WWDC 2009:

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

WWDC 2010:

  • 第 304 节课 - 仪器的新变化
  • Session 306 - 使用仪器自动化用户界面测试
  • 第 309 课 - 使用仪器进行高级性能分析
  • 第 311 课 - 使用仪器进行高级内存分析

WWDC 2011:

  • 第 310 课 - 仪器的新变化
  • 会话 312 - 使用仪器进行 iOS 性能和功耗优化

WWDC 2012:

  • 第 409 节课 - 学习工具

WWDC 2014:

  • 会话 418 - 使用仪器改进您的应用

WWDC 2015:

  • 第 412 节课 - 深入剖析

WWDC 2016:

  • 会话 411 - 深入的系统跟踪
  • 会话 418 - 在仪器中使用时间分析器

WWDC 2018:

  • 会话 405 - 使用日志测量性能
  • 第 407 场会议 - 实现卓越应用性能的实用方法
  • 会话 410 - 创建自定义工具

WWDC 2019:

  • 第 411 节课 - 仪器入门
  • 第 414 课 - 开发出色的分析体验
  • 第 421 节课 - 在自定义工具中建模

2020 年技术讲座:

  • 揭开并消除渲染阶段的故障
  • 在提交阶段查找并修复故障

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

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