How to activate Cycles reporting in Instruments under ARC?

后端 未结 1 523
小鲜肉
小鲜肉 2020-12-31 12:05

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 accid

相关标签:
1条回答
  • 2020-12-31 12:48

    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.

    0 讨论(0)
提交回复
热议问题