1. make sure enough memory is allocated not only for the properties defined by an object's class, but also the properties defined on each of the superclasses in its inheritance chain.
The NSObject root class provides a class method, alloc, which handles this process for you: + (id)alloc;
The alloc method has one other important task, which is to clear out the memory allocated for the object's properties by setting them to zero. This avoids the usual problem of memory containing garbage from whatever was stored before, but is not enough to initialize an object completely.
2. init: The init method is used by a class to make sure its properties have suitable initial values at creation