I have seen and done initialization of arrays and all put "nil" at the end of initialization but never question, why it is required to put there?
Plus if you are initializing your array in a loop, is it still necessary to put nil at the end of array? for example.
array = [[NSMutableArray alloc] init];
for (int i = 0 ; i < 10; i++)
{
[array addObject:@"1"];
}
// now this line is required or not after i exit the loop?
[array addObject:nil];