It is easy to understand the concept of setter/getter for a simple data, an NSInteger for example.
If we say: NSInteger a;
The setter for "a" changes the value of a, and the getter only gets (returns) its value. It is then easy to understand atomic/nonantomic concept since atomic will guarantee that reading "a" when a is being chnaged will always return a whole value (getter and setter are synchronized).
But what I do not clearly understand is setter and getter for properties which are pointers to objects (NSData*, NSString* for example). Let's say for example a NSMutableData:
If we say: NSMutableData *m_my_mutable;
Imagine I have a setter setMyMutable and getMyMutable for this property which belongs to my object MyObject. If I do this, then I will call the getter (since I get the object before appending data):
[[MyObject getMyMutable] appendData....]
but appendingData will also modify it, thus sould not it be seen as a setter action instead ? Or does setter only refer to the fact of initiliazing a value (which can be retained for example).
There is something I must be missing in the concept.
Thanks Apple92