I have an ivar mutable array which i setup in viewDidLoad as follows:
names = [NSMutableArray arrayWithCapacity:30];
[names addObject:@"Joe"];
[names addObject:@"Dom"];
[names addObject:@"Bob"];
Then in a later method, on tap of a button, i do the following, but the array appears to be overreleasing... with Zombie messaged:
int r = arc4random() % [names count];
NSLog(@"%d", r);
How do i fix this?
Thanks.