December 2012
Beginner
552 pages
12h 58m
English
Here are some rules to remember when working with a project compiled without ARC or garbage collection:
• If you need to hold on to an object to make sure it doesn’t get destroyed by someone else, you should retain it. Make sure to release the object when you’re done with it.
• Sending a release message does not necessarily destroy an object. When an object’s reference count is decremented to 0, the object is destroyed. The system does this by sending the dealloc message to the object to free its memory.
• Release any objects that you have retained or have created using a copy, mutableCopy, alloc, or new method. This includes properties that have the retain or copy attribute. You can override dealloc ...
Read now
Unlock full access