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

What is ARC and how does it work?


If you remember, the idea of reference counting covers the actual deletion of objects from the memory. With reference counting, Objective-C takes care of the actual object destruction. Owner objects are only responsible for releasing their claim of ownership on the object. So, logically the idea that appeared next was to make everything completely automatic as it was done in languages such as Java and C#. This idea was developed in the Garbage collection branch and Automatic Reference Counting.

Garbage collection is only available for Mac OS X, starting with version 10.5. Also, note that iOS applications can't use Garbage collection; since it relies on the power of the device, it will take some time to process, forcing the user to wait the process end, thus producing a bad user experience. It is also deprecated since OS X Version 10.8 is in favor of ARC and is scheduled to be removed in the forthcoming versions of OS X.

ARC is a new and innovative way that...