ios之alloc和init

 
复制代码
  1. SomeObject *obj = [[SomeObject alloc] initWithCenter:centerPoint radius:radius];







 
复制代码
  1. SomeObject *obj = [SomeObject alloc];[obj initWithCenter:centerPoint radius:radius];





这两句不是等效的。第二句的执行结果可能返回无效对象。

posted @ 2014-02-16 16:22  yulang  阅读(215)  评论(0)    收藏  举报