码迷,mamicode.com
首页 > 其他好文 > 详细

【OC知识点】alloc 和init

时间:2020-01-07 16:34:39      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:知识点   csdn   cal   any   instance   UNC   isa   obj   rac   

alloc:执行过程
(1)alloc
(2)allocWithZone
(3)class_createInstance
(4)calloc
(5)initIsa
 
init:

id _objc_rootInit(id obj)
{
  // In practice, it will be hard to rely on this function.
  // Many classes do not properly chain -init calls.
  return obj;
}

参考:https://blog.csdn.net/qqq274628593/article/details/53023492

 

【OC知识点】alloc 和init

标签:知识点   csdn   cal   any   instance   UNC   isa   obj   rac   

原文地址:https://www.cnblogs.com/mamamia/p/12161833.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!