Chapter 13 in brief


#1

alloc: alloc returns a pointer to a new object that needs to be initialized. That pointer is then used to send the new object the message init. Using alloc & init is the most common way to create objects in O-C.
init: Returns a pointer to the new object(which is nearly always the pointer that came off the alloc method).
nil: nil is a pointer to no object. In O-C, nil is the zero pointer. When O-C was designed, it was decided that sending message to nil would be OK.
Important thing #1: If you are sending message and nothing is happening, make sure you are not send message to a pointer that has been set to nil.
Important thing #2: If you send a message to nil, the return value doesn’t mean anything.