title: Correctly override setter in Objective-C
body: <p>I just tried to override the standard synthesised setters of a property. So far everything is fine I just set the ivar to my new value. But then I asked myself 'what happens with the retain count of retained properties'... I found no good answer that explained this to me. So I ask it here. Is there anything I have to be aware of if I override a properties setter that is set to <code>retain</code> and how can I do it correctly? I do not use ARC.</p>
  
  <p>Here's an example:</p>
  
  <pre><code>@property(nonatomic)NSInteger number;
  
  - (void)setNumber:(NSInteger)number {
      _number = number;  // This should be fine, since it's no retained object I want to set
  }
  
  
  @property(nonatomic, retain)NSObject *something;
  
  - (void)setSomething:(NSObject *)something {
      _something = something;  // This is not fine. As far as I know you should never do sth. like this... But how do I set it correctly?
  }
  </code></pre>