Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
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.