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?