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 a class?


In object-oriented programming approaches, an object is an instance of a class. The class will determine the behavior of the object, the messages (methods) it receives, and sometimes who has access to send these messages in order to obtain a response.

A class describes the properties and behaviors of a specified object, just like the blueprint of a house will describe the properties of the house, such as the number of doors in the house. Similarly, for a number, an instance of a class named NSNumber, its class provides many ways to obtain, analyze, compare, and convert the object's internal numeric value.

Except the internal contents stored in multiple instances of a class, all the properties and actions behave identically. Check out the following example:

/*
  =============================================
  Our object is created here as instance of NSNumber.
  We directly assign a float number to it;
  =============================================
*/

NSNumber *sampleNumber...