Download objC4 source code:opensource.apple.com/tarballs/
-
Open the project and search for:
struct objc_class
, find runtime.h:Can be found: there areisa
A pointer,superclass
A pointer,ivar
Member variable,method_list
List of methods,cache
Cache,protocol_list
Protocol list.It’s worth noting, however, that this structure has been abandoned since OBJC2: OBJC2_UNAVAILABLE.
-
So we keep looking for the latest structure:The objc_object object contains a pointer to isa:The final analysis results are as follows:In fact, there is no essential difference between the new structure and the old structure, all the main characteristics of the information, and some more member variables.