I have the following method:
-(NSMutableArray *)someArray{ // line 1
if(self.someArray == nil){ // line 2
self.someArray = [[NSMutableArray alloc]init];
}
return self.someArray;
}
I had this in non-ARC, and it works fine: If self.someArray in line 2 is nil, then go ahead and instantiate it.
However, after I switched to ARC, when it gets to line 2, it goes back to line 1, and the loop continues.
Any help will be greatly appreciated.
Thanks.
The proper form is