Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Memory management can get pretty hairy in larger apps, so Apple has a couple of rules established to keep track of who’s in charge of releasing and retaining when.
You own objects you create with alloc, new, copy, or mutableCopy.
If you create an object with alloc, new, copy, or mutableCopy, it will have a retain count of 1, and you’re responsible for sending a release when you’re done with the object. You can also put the object in the autorelease pool if you want the system to handle sending a release later.
Assume everything else could go away at the end of the event loop unless you take ownership.