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

24.8. Summary

Managed memory requires some additional effort, but it isn't onerous. Just remember these basic rules:

  • When storing an object reference in a persistent variable, retain it.

  • Release or autorelease any retained reference before discarding it.

  • Write a -dealloc method to release all retained objects.

  • Always return retained or autoreleased objects.

  • Autoreleased objects won't be released until after the current method has returned.


  

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