How the strong reference works
id __strong obj0 = [[NSObject alloc] init];
/*
* obj0 has a strong reference to object A*/
id __strong obj1 = [[NSObject alloc] init];
/*
* obj1 has a strong reference to object B*/
id __strong obj2 = nil;
/*
* obj2 has no reference*/
obj0 = obj1;
/*
*Obj0 has a strong reference to object B,
* So, obj0 does not have a strong reference to object A anymore.
* Object A is disposed of because no one has ownership of it.
* At this moment, both obj0 and obj1 have strong references to object B.
*/
obj2 = obj0;
/*
* Through obj0, obj2 has a strong reference to object B.
*
* At this moment, obj0, obj1 and obj2 have strong references to object B.
*/
obj1 = nil;
/*
* Because nil is assigned to obj1, strong references to object B disappear.
* At this moment, obj0, and obj2 have strong references to object B.
*/
obj0 = nil;
/*
* Because nil is assigned to obj0, strong references to object B disappear.
* At this moment, obj2 have strong references to object B.
obj2 = nil;
/*
* Because nil is assigned to obj2, strong references to object B disappear.
* Object B is disposed of because no one has ownership of it
ARC How the strong reference works,布布扣,bubuko.com
ARC How the strong reference works
原文:http://blog.csdn.net/majiakun1/article/details/23283883