Graphics Programs Reference
In-Depth Information
(If the
Use Automatic Reference Counting
box in
Figure 3.4
was unchecked, the applica-
tion would use
manual reference counting
instead, which was the only type of memory
management available before iOS 5. For more information about manual reference count-
ing and
retain
and
release
messages, see the For the More Curious section at the
end of this chapter.)
ARC can be relied on to manage your application's memory automatically for the most
part, but it's important to understand the concepts behind it to know how to step in when
you need to. So let's return to the idea of object ownership.
How objects lose owners
We know that an object is safe to destroy - and should be destroyed - when it no longer
has any owners. So how does an object lose an owner?
• A variable that points to the object is changed to point to another object.