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
  • PrintPrint

ARC Rules

ARC requires that you obey certain rules that do not apply when compiling without ARC. These rules include:

• Do not implement or invoke retain, release, retainCount, or autorelease.

• Do not explicitly invoke dealloc; even [super dealloc] is prohibited. You can freely override the dealloc method to perform any standard task cleanup such as freeing malloc’ed memory, disposing of system sounds, or calling Core Foundation release (CFRelease), as needed. The compiler automatically calls [super dealloc] for you, regardless of whether you override dealloc in your subclasses or not.

• Never use NSAllocateObject or NSDeallocateObject.

• Do not cast between (id) and (void *). Instead, cast to Core Foundation object references and pass those as function arguments.


  

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


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint