Type Method 型メソッド

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 オブジェクトの作成、複製、そして割り当て解除