How to activate Cycles reporting in Instruments un

2019-02-06 12:45发布

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.

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?

Found a screenshot as evidence:

enter image description here

1条回答
ゆ 、 Hurt°
2楼-- · 2019-02-06 13:22

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.

查看更多
登录 后发表回答