Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. Creating classes > Creating and destroying objects

5.5. Creating and destroying objects

One of the most common tasks to perform with classes is the creation of new objects. In Objective-C it takes two steps to create an object; in order, you must

  • Allocate memory to store the new object.

  • Initialize the newly allocated memory to appropriate values.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial