Can you please explain me exact difference between these two lines?
NSArray *foo = [NSArray arrayWithObjects:@"hai",@"how",@"are",@"you",nil];
NSArray *bar = [[NSArray alloc] initWithObjects:@"hai",@"how",@"are",@"you",nil];
See Question&Answers more detail:os