title: @property/@synthesize question
body: <p>I'm going through all of my documentation regarding memory management and I'm a bit confused about something.</p>
  
  <p>When you use @property, it creates getters/setters for the object:</p>
  
  <p>.h:
      @property (retain, nonatomic) NSString *myString</p>
  
  <p>.m:
      @synthesize myString</p>
  
  <p>I understand that, but where I get confused is the use of self. I see different syntax in different blogs and books. I've seen:</p>
  
  <pre><code>myString = [NSString alloc] initWithString:@"Hi there"];
  </code></pre>
  
  <p>or </p>
  
  <pre><code>self.myString = [NSString alloc] initWithString:@"Hi there"];
  </code></pre>
  
  <p>Then in dealloc I see:</p>
  
  <pre><code>self.myString = nil;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>[myString release];
  </code></pre>
  
  <p>or </p>
  
  <pre><code>self.myString = nil;
  [myString release];
  </code></pre>
  
  <p>On this site, someone stated that using self adds another increment to the retain count? Is that true, I haven't seen that anywhere. </p>
  
  <p>Do the automatic getters/setters that are provided autorelease? </p>
  
  <p>Which is the correct way of doing all of this? </p>
  
  <p>Thanks!</p>