Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
So far, reference counting may seem like just a fancy name for “remember to free what you have allocated.” Its real usefulness becomes apparent when you start passing objects around from one method to another.
An object received from another method is presumed to remain valid for the remainder of the receiving method. In the following example, NSDate’s date method returns an object that represents the current time and date: