title: Retain count of a synthesized property
body: <p>Please review my code:</p>
  
  <pre><code>@interface ClassA : NSObject {
      ClassB *objB;
  }
  
  @property (retain) ClassB *objB;
  @end
  
  @implementation ClassA:
  @synthesiaze objB;
  @end
  
  int Main(int argc, const char *argv[])
  {
      ClassA *objA = [[ClassA alloc] init];
      ClassB *objB = [[ClassB alloc] init];
  
      NSLog(@"%d", (int)[objB retainCount]);    // 1
      NSLog(@"%d", (int)[[objA objB] retainCount]);     // 0
  
      objA.objB = objB;
  
      NSLog(@"%d", (int)[objB retainCount]);    // 2
  /* --&gt; */    NSLog(@"%d", (int)[[objA objB] retainCount]);     // 3
      NSLog(@"%d", (int)[[objA objB] retainCount]);     // 4
      NSLog(@"%d", (int)[objB retainCount]);    // 4
  }
  </code></pre>
  
  <p>Please look at line 23,  <code>NSLog(@"%d", (int)[[objA objB] retainCount]);</code></p>
  
  <p>I think the result should be 2 not 3, but every time, calling <code>[objA objB]</code> seems to increase the retain count by 1. I don't know what's happening. Who can tell me? Thanks!</p>