title: Passing NSMutableArray into a function
body: <p>I have this problem with Cocoa, I am calling a function and passing an Array to it:</p>
  
  <p>Some where I call the function:</p>
  
  <pre><code>[self processLabels:labels];
  </code></pre>
  
  <p>And the function is as follow: </p>
  
  <pre><code>- (void)processLabels:(NSMutableArray*)labs{
      labs = [[NSMutableArray alloc] init];
      [labs addObject:@"Random"];
  ....
  }
  </code></pre>
  
  <p>When debugging, I notice that no new object are being added to labels when they are added to labs. Is it because I am re-initializing labs? how could I re-initialize labels inside the function then?</p>
  
  <p>I tried using byref by didn't succeed,
  any help is appreciated..
  thanks</p>