After you place instances of an instance of an instance, you must create an instance. self = [super init] means initializing the superclass method
A common mistake is writing
self = [[super alloc] init]; which returns an instance of the superclass, which is NOT what you want in the constructor of the / init subclass. You return an object that does not conform to the methods of the subclass, which may be misleading, and generates confusing errors in that they do not respond to the methods or identifiers found, etc.
self = [super init] necessary if the superclass has elements (variables or other objects) to initialize first before setting up members of the subclass. Otherwise, the objc runtime initializes them all to 0 or nil. (unlike ANSI C, which often allocates chunks of memory without clearing them at all)
And yes, initialization of the base class may fail due to errors due to memory, missing components, resource collection failures, etc., so checking for zero is reasonable and takes less than a few milliseconds.
source share