title: A question about setter in objective-c
body: <p>This is an example from The Objective-C 2.0 Programming Language.
  I was just wondering, in the setter at the bottom, can I use <code>value = [newValue retain]</code>
  instead of <code>value = [newValue copy]</code> ?</p>
  
  <pre><code>    @interface MyClass : NSObject
  
  {
  
      NSString *value;
  
  }
  
  @property(copy, readwrite) NSString *value;
  
  @end
  
  
  
  // assume using garbage collection
  
  @implementation MyClass
  
  @dynamic value;
  
  
  
  - (NSString *)value {
  
      return value;
  
  }
  
  
  
  - (void)setValue:(NSString *)newValue {
  
      if (newValue != value) {
  
         value = [newValue copy];
  
      }
  
  }
  
  @end
  </code></pre>