nil
Objective-C实例对象指针空值: NSSring *str = nil;
#define nil ((void*)0)
Nil
类对象指针空值: Class class = Nil;
#define nil ((void*)0)
NULL
C指针空值: char *p = NULL;
#define NULL ((void*)0)
NSNull
是一个Objective-C继承NSObject的类,多用于数组字典里面的空值
@interface NSNull : NSObject <NSCopying, NSSecureCoding>
+ (NSNull *)null;
@end
kCFNull
是NSNull的单例 [NSNull null]
typedef const struct CF_BRIDGED_TYPE(NSNull) __CFNull * CFNullRef;
const CFNullRef kCFNull; // the singleton null instance
网友评论