Settings for properties in IOS 5 new strong and weak keywords to decorate properties (arc not supported before iOS 5)
Strong is used to modify properties of strong references;
@property (Strong) SomeClass * aobject;
corresponding to the original
@property (Retain) SomeClass * aobject;
and @property (copy) SomeClass * aobject;
Weak is used to modify the properties of weak references;
@property (weak) SomeClass * aobject;
corresponding to the original
@property (assign) SomeClass * aobject;
__weak, __strong is used to modify variables, in addition to __unsafe_unretained, __autoreleasing are used to modify variables.
__strong is the default keyword.
__weak declares a weak reference that can be automatically nil.
__unsafe_unretained declares a weak application, but does not automatically nil, that is, if the area of memory pointed to is released, the pointer is a wild pointer.
__autoreleasing is used to modify the parameters of a function, which is automatically released when the function returns.
Usage of strong and weak in IOS5