Would it be correct/ellegant use only alloc without init?

后端 未结 4 782
[愿得一人]
[愿得一人] 2020-12-28 23:48

If we don\'t want to implement init method in our class, and bearing in mind that init in NSObject only returns an instance of the object without initialization, I don\'t se

4条回答
  •  孤城傲影
    2020-12-29 00:27

    in runtime source code perform -(id)init will call _objc_rootInit(self) and will return self. I guess only perform init is OK。

提交回复
热议问题