美文网首页
alloc init

alloc init

作者: LPL_d5fc | 来源:发表于2020-04-19 22:24 被阅读0次

alloc, init

alloc时 :完成内存分配。

init : 只是返回实例对象(id)。

Person *p = [Person alloc];

Person *p1 = [p init];

Person *p2 = [p init];

p1和p2 地址是一样的。

相关文章

网友评论

      本文标题:alloc init

      本文链接:https://www.haomeiwen.com/subject/nwlxvhtx.html