2

Instruments gives me a beautiful breakdown of the reference counting events for my objects like so:

instruments

It also tells me inside which method/function the calls occurred. Is there any way to find out which lines are responsible for the calls?

lmirosevic
  • 15,787
  • 13
  • 70
  • 116
  • Can't you just step debug and monitor the retain counts of the objects? I don't think Instruments can do that, but I am not a pro. – guitarflow Feb 15 '12 at 11:55
  • 1
    AFAIK you can't run instruments and the debugger simultaneously. – lmirosevic Feb 15 '12 at 12:10
  • The latter part of [this answer](http://stackoverflow.com/a/14105056/1271826) shows you how to turn on reference counting in the "Allocations" tool, which can then take you to the offending line of code. – Rob Mar 29 '14 at 13:44

1 Answers1

0

Have you run both "Leaks" and "Allocations" Instruments separately? ARC generally means you only need to watch the "ownership" of the references. Also, have you spun open the right hand "detail" view in Instruments? That usually gives you the stack of calls for a selected row in the allocation chain.

Scott Corscadden
  • 2,831
  • 1
  • 25
  • 43