title: Objective-C: instance variable as a parameter, but after method call instance variable is empty
body: <p>I do some iOS programming stuff and I have a <code>UIViewController</code> with a <code>NSMutableArray</code>:</p>
  
  <pre><code>@property (nonatomic, retain) NSMutableArray* mutableTestArray;
  ...
  @synthesize mutableTestArray;
  </code></pre>
  
  <p>In <code>viewDidLoad</code> I want to call a method which is inside the implementation of this <code>UIViewController</code>:</p>
  
  <pre><code>//- (void)aTestMethod:(NSMutableArray *)myMutableTestArray;
  [self aTestMethod:self.mutableTestArray];
  </code></pre>
  
  <p>So I call the method with a <code>NSMutableArray</code> which is an instance variable of the <code>UIViewController</code>. Inside this method, I do this:</p>
  
  <pre><code>myMutableTestArray = [NSMutableArray arrayWithCapacity:100];
  //... looping &amp; generating some objects and adding them to the array:
  [myMutableTestArray adObject:myObject];
  </code></pre>
  
  <p>Now, I debug it and inside the method <code>myMutableTestArray</code> is fine. There are all objects inside the array. But leaving this method the instance variable <code>mutableTestArray</code> is empty.</p>
  
  <p>So, where is the problem? Anyone an idea?
  Note: I know I can access the instance variable with <code>self.mutableTestArray</code> and then everything will be okay, instead using it as a parameter, but I want to know what's wrong with my code.</p>
  
  <p>Thank you in advance &amp; Best Regards.</p>