-5

Possible Duplicate:
Xcode property attributes (nonatomic , copy , strong , weak)

I want to know the Copy attribute working process with any example. Thanks

Community
  • 1
  • 1
Abhinay
  • 1
  • 1
  • ` copy" is required when the object is mutable. Use this if you need the value of the object as it is at this moment, and you don't want that value to reflect any changes made by other owners of the object. You will need to release the object when you are finished with it because you are retaining the copy.` http://stackoverflow.com/questions/9859719/xcode-property-attributes-nonatomic-copy-strong-weak – janusfidel Aug 22 '12 at 12:35

1 Answers1

0

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.

check out this previous asked question's answer

Community
  • 1
  • 1
Ravi Sharma
  • 975
  • 11
  • 29