Book Image

Objective C Memory Management Essentials

Book Image

Objective C Memory Management Essentials

Overview of this book

Table of Contents (18 chapters)
Objective-C Memory Management Essentials
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Objective-C, C, and memory management


Objective-C and the C programming language are closely related as Objective-C is a proper superset of C, which means that anything that works in C will work with Objective-C. So inherently, it also means that memory management methods and protocols that you are familiar with in C or C++ will also apply to Objective-C. However, a good thing about Objective-C is that the compiler does a lot of this memory management for you under the hood. This means that you do not need to write too much code to handle memory management in Objective-C compared to C or C++.

However, do note that although you can mix C++ and Objective-C together, Objective-C is not a superset of C++. This does not mean that you can be totally hands off with regards to memory management since Objective-C does not have a garbage collector like what you get in Java.

With the release of Automatic Reference Counting (ARC) support in Xcode 4.2 and iOS 4 and 5 onwards, developers everywhere thought...