title: ARC and autorelease
body: <p>autorelease is used for returned function object so the caller don't take ownership and callee will release the object in the future.</p>
  
  <p>However, ARC is capable to count ownership of caller and release it after use, that is, it can behavior just like Smart Pointer in C++.  With ARC, it can get rid of autorelease because autorelease is non-deterministic.</p>
  
  <p>The reason I ask for this question is that I do see the returned object calls dealloc earlier in ARC than non-ARC code.  This leads me to think that ARC can behvior like Smart Pointer and can make autorelease useless.  Is it true or possible?  The only thing I can think about autorelease usefullness is in multip-thread or network code because it may be not easier to count the ownership when the object is passing around.</p>
  
  <p>Thanks for your thoughts.</p>
  
  <p>Here is new edit to make thing clear:</p>
  
  <p>with autorelease</p>
  
  <pre><code>+ (MyClass*) myClass
  {
      return [[[MyCClass alloc] init] autorelease];
  }
  
  - doSomething
  {
     MyClass *obj = [MyClass myClass];
  }
  </code></pre>
  
  <p>With ARC:</p>
  
  <pre><code>+ (MyClass*) myClass
  {
      return [[MyCClass alloc] init]; // no autorelease
  }
  
  - doSomething
  {
     MyClass *obj = [MyClass myClass];
     // insert [obj release]
  }
  </code></pre>
  
  <p>So, we really don't need autorelease.</p>