4

If I understand correctly, all ARC does is automatically add memory-management statements such as retain and autorelease in the proper places in a program. Is there any way to see all the memory-management statements that ARC automatically adds to a program?

JoelFan
  • 7,091

2 Answers2

5

In Xcode's assistant editor, choose to view the Assembly for the file you're working on. You should see calls to functions like objc_retain and similar; these are the functions inserted by the compiler to support ARC.

2

You can use CFGetRetainCount to see the retain count:

CFGetRetainCount( (__bridge void*) object );