Graphics Programs Reference
In-Depth Information
NSLog(@"Setting items to nil...");
items = nil;
Build and run the application. After the
BNRItem
s print out, you will see the message an-
nouncing that
items
is being set to
nil
. Then, you will see the destruction of each
BNRItem
logged to the console.
At the end, there are no more objects taking up memory, and only the
main
function re-
mains. All this automatic clean-up and memory recycling occurs simply by setting
items
to
nil
. That's the power of ARC.