nil:指向oc中对象的空指针 Nil:指向oc中类的空指针 NULL:指向其他类型的空指针,如一个c类型的内存指针 NSNull:在集合对象中,表示空值的对象 若obj为nil:[obj message]将返回NO,而不是NSException 若obj为NSNull:[obj message]将抛出异常NSException 下面是官方文档的解释: nil Defines the id of a null instance. Available in iOS 4.0 and later. N…
[NSNull null]是一个对象,其类为NSNULL(isa):里面没有任何变量.函数.和实现. nil的处理展示出消息机制的优越性,相对于函数调用的空指针处理. ENTRY objc_msgSend # check whether receiver is nil teq a1, #0 itt eq moveq a2, #0 bxeq lr # save registers and load receiver's class for CacheLookup stmfd …