O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

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

What is ARC?

To understand ARC, you should know a little history. In the old days, Cocoa programmers managed their objects’ reference counts manually by retaining and releasing objects. There were rules, and the rules were fairly simple. This worked well.

Then garbage collection came to Cocoa in 2007. Garbage collection was fine, but it had awkward constraints on the contexts in which it could be used – it was all garbage collection or nothing.

A couple years later, Xcode 3.2 offered an exciting new feature: the Clang Static Analyzer, which knew the retain counting rules and could alert you to memory management errors in your code! Garbage collection never came to iOS. Instead, ARC was announced in 2011, and garbage collection ...

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