这个isa到底是什么呢?

官方介绍是这样的:

Every object is connected to the run-time system through itsisainstance variable,inherited fromthe NSObject class.isaidentifiesthe object's class;it points to a structure that's compiled from the class definition. Throughisa, an object can find whatever information it needs at run timesuch as its place in the inheritance hierarchy, the size and structure of its instance variables, and the location of the method implementations it can perform in response to messages.

Every object has anisainstance variable that identifies the object's class. The runtime uses this pointer to determine the actual class of the object when it needs to.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容