Would it be correct/ellegant use only alloc without init?
问题 If we don't want to implement init method in our class, and bearing in mind that init in NSObject only returns an instance of the object without initialization, I don't see the point of calling init if we already get the instance with alloc. I have tried and it works, but I am not sure it won't cause future problems. myClass *newObject = [myClass alloc]; instead of: myClass *newObject = [[myClass alloc] init]; Thanks a lot. 回答1: No, just calling alloc would not be correct. alloc zeroes out