Contents

new

Allocates a new instance of the receiving class, sends it an Init() message, and returns the initialized object.

Declaration

+ (instancetype) new;

Return Value

A new instance of the receiver.

Discussion

This method is a combination of alloc and init(). Like alloc, it initializes the isa instance variable of the new object so it points to the class data structure. It then invokes the init() method to complete the initialization process.

See Also

Creating, Copying, and Deallocating Objects