title: Keeping an object inserted in NSMutableArray property
body: <p>I came up with an idea for displaying the high score of a game and what I'm actually trying to do is basically adding two numbers to an <code>NSMutableArray</code> and checking the biggest between the two numbers the biggest stays in the array the other must be removed.</p>
  
  <pre><code>@property (strong, nonatomic) NSMutableArray *highscoreArray;
  
  -(void)displaHighScorelabel:(int)score
  {
      NSNumber *point = [NSNumber numberWithInt:score];
      [self.highscoreArray addObject:point];
      int highscore = 0;
      if([self.highscoreArray indexOfObject:[self.highscoreArray lastObject]] == 0)
          highscore = [[self.highscoreArray lastObject]integerValue];
      else for(int i=0; i &lt; [self.highscoreArray count];i++)
      {
          if ([self.highscoreArray[i] intValue] &gt;= [self.highscoreArray[i+1] intValue]) {
              [self.highscoreArray removeObjectAtIndex:i+1];
              highscore = [self.highscoreArray[i] intValue];
          }
          else if([self.highscoreArray[i] intValue] &lt;= [self.highscoreArray[i+1] intValue])
          {
              [self.highscoreArray removeObjectAtIndex:i];
              highscore = [self.highscoreArray[i+1] intValue];
          }
      }
      self.highscoreLabel.text = [NSString stringWithFormat:@"High Score: %i",highscore];
      [self CheckSomething:self.highscoreArray];
  }
  </code></pre>
  
  <p><strong>The problem is:</strong> the array only keeps one number in the heap. How can I keep it without releasing it? Since the next number I'm going to add will be at index 0 which basically means the previous number was released out of the heap.</p>