Today we are going to look at what is the underlying implementation of a class?

First we know object_class inheritance and objc_Object, both of which are low-level code

In the code

Let’s explore what the underlying implementation of member variables (primitive data types)/ attributes/instance variables looks like.

Generate a CPP file with the clang-rewrite-objc main.m -o main.cpp command

Translation memory

Let’s look at the following differences in property definitions

Note that the above results differ in the definition of the set method

Atomic, copy, mutableCopy, and so on all use reallySetProperty

Other extensions:

Isa stores information about classes, whether they are being released, reference counts, and weak

The object ISA is not the same as a class

The isa class is the same as metaclasses

Take a look at the underlying implementation of isKindOfClass

TCLS is the current root metaclass, whose parent is NSObject

Does the above code really remove isKindOfClass?

Now set to Assembly mode and uncover the truth

Objc_opt_isKindOfClass, oh huo, isn’t it in the pit……