title: Objective-C Dot Syntax and Init
body: <p>I have read a number of snippets that mention you should never use dot-notation within your init or dealloc methods. However, I can never seem to find out why. One post did mention in passing that it has to do with KVO, but no more.</p>
  
  <pre><code>@interface MyClass : NSObject {
      SomeObject *object_;
  }
  @property (nonatomic, retain) SomeObject *object;
  @end
  </code></pre>
  
  <p>This implementation is bad?</p>
  
  <pre><code>@implementation MyClass 
  
  @synthesize object = object_;
  
  - (id)initWithObject:(SomeObject *)object {
      if (self = [super init]) {
          self.object = object;
      }
  
      return self;
  }
  @end
  </code></pre>
  
  <p>But this is good?</p>
  
  <pre><code>@implementation MyClass 
  
  @synthesize object = object_;
  
  - (id)initWithObject:(SomeObject *)object {
      if (self = [super init]) {
          object_ = [object retain];
      }
  
      return self;
  }
  @end
  </code></pre>
  
  <p>What are the pitfalls of using dot-notation inside your init?</p>