如何在ARC下激活仪器中的循环报告? [英] How to activate Cycles reporting in Instruments under ARC?

查看:91
本文介绍了如何在ARC下激活仪器中的循环报告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

仪器可以用图形有趣的方式显示ARC下的保留周期。我还记得几天前我偶然发现仪器中的Cycles视图。

Instruments can visualize retain cycles under ARC in a graphically interesting way. I also remember that a few days ago I spotted the "Cycles" view in Instruments by accident.

现在我开始使用ARC,突然之间我无法找到那个了。 Allocations和VM Tracker仪器不提供它,也不提供Leaks仪器。

Now where I started using ARC, suddenly I'm not able to find that anymore. The Allocations and VM Tracker instruments don't offer it, and the Leaks instrument either.

我必须做什么才能看到保留周期?

What must I do in order to see retain cycles?

找到截图作为证据:

推荐答案

使用Xcode 4.2.1,我在泄漏中找到它,在Cycles& Roots下。但是,我发现使用ARC时它不太有用。它确实检测到CF泄漏,显然我正在泄漏一个递归块,我无法做任何事情,但我必须根除Leaks从未发现的几个保留周期。为了找到保留周期,我建议使用Allocations并在执行您怀疑泄漏的操作之间运行几个堆镜头。然后你通过临时堆镜头找到罪魁祸首。

Using Xcode 4.2.1, I found the it in "Leaks", under "Cycles & Roots". However, I've found it less than useful when using ARC. It does detect CF leaks and apparently I'm leaking a recursive block, which I can't do anything about, but I've had to root out several retain cycles that Leaks never found. For finding retain cycles, I recommend using "Allocations" and running several heap shots between performing the action you suspect of 'leaking'. You then then look through the interim heap shots to find the culprit.

这篇关于如何在ARC下激活仪器中的循环报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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