Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to activate Cycles reporting in Instruments under ARC?

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

like image 708
Proud Member Avatar asked Jan 13 '12 14:01

Proud Member


1 Answers

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.

like image 198
Aaron Hayman Avatar answered Oct 20 '22 11:10

Aaron Hayman