title: c++ equivalent in Objective-C [alloc [init]]
body: <p>Am I right in saying the equivalent of:</p>
  
  <pre><code>NSMutableArray *foo;
  foo = [[NSMutableArray alloc] init];
  [foo release];
  </code></pre>
  
  <p>Is C++:</p>
  
  <pre><code>NSMutableArray *foo = new NSMutableArray();
  delete foo;
  </code></pre>
  
  <p>ie. The 2nd line of the Obj-C does the dynamic memory allocation, while first just makes a pointer? In this case, what is the function of [init] VS. [alloc]?</p>
  
  <p>thanks guys - I'm almost finding a bit of C++ is almost a hindrance to learning Obj-C!</p>