December 2013
Beginner
576 pages
16h 4m
English
ARC works with code that has not been compiled with ARC. This can happen if you’re linking with an older framework, for example. As long as the non-ARC code has conformed to the standard Cocoa naming conventions, all will be okay. That is, when ARC sees a method call, it checks the method’s name. If the name begins with the words alloc, new, copy, mutableCopy, or init, it assumes that the method returns ownership of the object back to the method caller.
When we talk about “words” here, we refer to the words being written in what’s known as camelCase. That’s where the first letter of each new word in the name begins with a capital letter. So, the compiler assumes methods named allocFraction, newAddressCard ...
Read now
Unlock full access