Have you read the documentation? The Property Declaration Attributes section of the Objective-C Programming Language guide describes them this way:
assign - "Specifies that the setter uses simple assignment. This is the default. You typically use this attribute for scalar types..." So you can imagine assigning a float (which isn't an object, so can't be retained, copied, etc.).
retain - "Specifies that retain should be invoked on the object upon assignment. ... The previous value is sent a release message." So you can imagine assigning an NSString instance (which is an object and which you probably want to retain).
copy - "Specifies that a copy of the object should be used for assignment. ... The previous value is sent a release message." Basically same as retain, but sending -copy rather than -retain.
The retain/copy concepts come from the reference-counted memory management system.
Essentially, when used with @synthesize directive (to synthesize the property accessors you would otherwise write - like -person or -setPerson:), it determines how memory is managed inside the setter.
share|improve this answer
answered Dec 22 '10 at 16:00
Joshua Nozzi
31k36072