Wednesday, June 15, 2011

Property Attribute for iphone App

The following are some attribute used for property definition:

[assign]
This attribute indicates the property uses assignment in the property’s setter. No release to be called to the old value, and no retain to be called on the new value.

[retain]
This attribute indicates the property calls release to the old value, and retain on the new value.

[copy]
This attribute indicates the property calls release to the old value, and then allocate and copy a new object to the new value. The copy operation will retain on the newly created object.

[nonatomic]
This attribute indicate that the property’s accessor methods are not thread safe.. So do not access this property from multi-threads

No comments:

Post a Comment