Graphics Programs Reference
In-Depth Information
- the address in memory where the non-existent backpack used to live. Sending a message
to a non-existent object resulted in a crash. Oops.
As a novice iOS programmer, you won't use
__unsafe_unretained
. As an experi-
enced programmer, you probably won't use it, either. It exists primarily for backwards
compatibility: applications prior to iOS 5 could not use weak references, so to have simil-
ar behavior, they must use
__unsafe_unretained
.
Be safe. Change this variable back to
__weak
.
__weak
BNRItem *container;
Here's the current diagram of
RandomPossessions
. Notice that the arrow representing the
container
pointer variable is now a dotted line. A dotted line denotes a weak (or un-
safe unretained reference). Strong references are always solid lines.
Figure 3.9 RandomPossessions with retain cycle avoided