O'Reilly logo

Pro Multithreading and Memory Management for iOS and OS X by Kazuki Sakamoto, Tomohiko Furumoto

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3

ARC Implementation

In this chapter, we discuss the implementation of ARC itself to review what we learned in the last chapter, explaining in detail what ARC is and how it works.

Apple says, “Automatic Reference Counting (ARC) in Objective-C makes memory management the job of the compiler,” but the truth is, ARC isn’t the only job of the compiler. The objective-C runtime needs to help as well, so ARC is actually achieved by both tool and library:

  • Compiler: clang (LLVM compiler) 3.0 or later
  • Objective-C runtime library: objc4 493.9 or later

NOTE: As Apple says, if ARC is the only compiler’s job, the __weak ownership specifier can also be usable on iOS4 or OS X Snow Leopard.

When the application is compiled for iOS4 or OS X Snow Leopard, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required