I am having the property as follows
@property(strong,nonatomic)NSArray *dataArray;
I am trying to display the retainCount as follows
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.dataArray=[NSArray new];
NSLog(@"Retain Count1 %d",[dataArray retainCount]);
[dataArray release];
NSLog(@"Retain Count2 %d",[dataArray retainCount]);
}
As per as my understanding Retain Count1 and Retain Count2 should be 1 and 0 resp.
But I am getting the strange values 22 and 21 resp and when I run again sometimes the
retain count will be again incremented by 1 . Any help is greatly appreciated .