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

Chapter 1. Introduction to Objective-C Memory Management

In this chapter, we will concern ourselves principally with the core issues of the memory management problem as well as an Objective-C-based solution of it. We will look at the ownership and life cycle of the object. This basic idea is known as manual references counting, or Manual Retain Release (MRR), where you need to claim and relinquish ownership of every object. It defines an object's life cycle. And finally, we'll take a look deeper into NSObject for a better understanding of what's going on.

We will cover the following topics in this chapter:

  • Why do we need memory management in Objective-C?

  • An object's ownership and life cycle

  • The principles of reference counting

  • What's a memory leak and why pay attention to it?