How do things work inside Objective-C?
NSObject is the root class of most Objective-C class hierarchies, through it an object inherits basic methods and behaves like an Objective-C object.
This object is an instance of a class and can also be a member of a class or one of its derivatives. So, let's take a deeper look at
NSObject. In the early stage, Objective-C had a class called
Object. This had a method called
+new, which wrapped
malloc(), and a method called
-free. Since Objective-C objects were generally aliased and managing object life cycles became quite complex, this was troublesome.
NSObject is used by NeXT—Steve Job's second company, founded after he was fired from Apple in 1985—in order to provide ...