title: Objective C: Newbie question about allocation, retain and release
body: <p>New to OC, many years of C, C++, C#, mind is kind of boggled now.</p>
  
  <p>Given:</p>
  
  <pre><code>// AnInterface.h
  @interface AnInterface : NSObject  
  {  
  }  
  
  @property (retain) SomeObject* m_Object;  
  
  // AnInterface.m
  #import "AnInterface.h"  
  
  @synthesize m_Object;  
  
  -init
  {  
    self= [super init];  
    if(!self)  
      return (nil);  
  
    SomeObject* pObject= [[SomeObject alloc] init];  
    self.m_Object= pObject;  
    [pObject release];
  }  
  </code></pre>
  
  <p>I am pretty sure the above is correct. However,
  why not just do:</p>
  
  <pre><code>self.m_Object= [[SomeObject alloc] init];  
  </code></pre>
  
  <p>Does that work as well? Is it in violation of some memory management tenet? It seems like it should work, one line rather than three, but I am certain I must be missing something....</p>
  
  <p>Any insight would be appreciated.</p>