NSObject的alloc方法当然在NSObject的meta class里面去找。但是 alloc 之后返回的是一个实例变量,此时的isa指向的就是__NSPlaceholderArray这个类。
+ (instancetype)alloc OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
In the case of NSArray, when an instance is allocated, it’s an instance of another class that’s allocated (during a call to alloc), known as a placeholder array. This placeholder array is then converted to an instance of another class, which is a concrete subclass of NSArray. -《Effective Objective-C 2.0》
iOS Runtime:Class 和 meta-class1、Class Objective-C类是由Class类型来表示的,它实际是一个指向objc_class结构体的指针。它的定义如下 objc_class结构体定义如下: 在这...