title: NSMutableArray how to properly addObjects and release
body: <p>I am worried about than am I properly adding object and releasing them.</p>
  
  <ol>
  <li>What NSMutableArray actually contain - object's copy or just a pointer to them?</li>
  <li>What is the sequence in working with NSMutableArray? (alloc, init, work, release)</li>
  <li><p>How to retain and release it properly?</p>
  
  <pre><code>NSMutableArray *listData = [[NSMutableArray alloc] init];
  int i = 0;
  for (i = 0; i &lt; 3; i++)
  {
      MyData *obj = [[MyData alloc] init];
      NSString *name = nil;
      switch (i)
      {
          case 0:
              name = @"Semen";
              break;
          case 1:
              name = @"Ivan";
              break;              
          case 2:
              name = @"Stepan";
              break;              
          default:
              break;
      }       
      obj.name = name;
      [listData addObject: obj];
      [obj release];
   }
   [listData release]  //in dealloc method
  </code></pre></li>
  </ol>
  
  <p>or I need to release all contained objects first and only than do release on NSMutableArray object?</p>
  
  <p>Thanks!</p>