03 2014 档案
摘要:NSObject是一切OC类的基类,所以我们必须对NSObject所有的方法有一个清楚的认识。+ (void)load;当类或者分类被加入到runtime时,load方法会被调用,也就是说在main循环开始前load方法就已经被调用。(当类被加载到进程的address space时,runtime就...
阅读全文
摘要:1.对于autorelease的理解 Each thread in a Cocoa application maintains its own stack of autorelease pool blocks.(Advanced Memory Management Programming Guide:Using Autorelease Pool Blocks) 通过这句话,我们可以看出autorelease pool 是栈的形式,andautorelease pool blocks can be nested主线程中也有自己的autorelease pool,这又牵扯出run loop。实..
阅读全文

浙公网安备 33010602011771号