title: NSArray getter method not returning right value
body: <p>I'm making a program where one Class (classA) generates a random number and adds it to a mutable array.  A view controller (viewControllerA) calls a method from classA and receives the array of random numbers and stores it in its own array. </p>
  
  <p>I have another class (classB) that needs the same array. After viewcontrollerA is finished doing what it needs to do with the array, it calls the setter method for an array in classB. I call NSLog in the setter and getter methods for the array in classB to check to see if it loads.</p>
  
  <pre><code>-(void)setRandomNumberArray:(NSArray *)randomNumberArray{
  _randomNumberArray = randomNumberArray;
  
  NSLog(@"%@ setter", _randomNumberArray);
  }
  </code></pre>
  
  <p>-</p>
  
  <pre><code>-(NSArray *)randomNumberArray{
  if (!_randomNumberArray) {
      _randomNumberArray = [[NSArray alloc] init];
  }
  
  NSLog(@"%@ getter", _randomNumberArray);
  return _randomNumberArray;
  }
  </code></pre>
  
  <p>When I call the setter method in viewControlerA, NSLog returns the value of the array.
  When I call the getter method in viewControllerB, NSLog prints nothing from the getter method.</p>
  
  <pre><code>2012-05-29 23:57:43.589 SwipeGame[8603:f803] (
  ) getter
  </code></pre>
  
  <p>It's obviously setting the array but not retaining it for when i want to get it. What is going on? I've tried multiple other techniques and it always sets the array but doesn't retain it for when i want to "get" the array.</p>
  
  <p>the property for my array is set to retain btw..</p>
  
  <p>UPDATE:
  Yes I am using ARC. my property declaration is:</p>
  
  <pre><code>@property (nonatomic, strong) NSArray *randomNumberArray
  </code></pre>
  
  <p>SOLVED:
  Thanks for all your help! It was a problem with instances.</p>