What is the point of the isa field of a class that points to itself? Or why does Xcode bother it?

As you can see below, objects in Objective-C all have an isa field indicating which class. In the end, everything points to an NSObject, which in turn points to a class. Why does this class have an isa pointing to itself? It may even make sense to have this self-reference field for the Class object, but then what point does Xcode show this in the clock window? Is Xcode just superliter here, or does it ever make sense to show the isa field for a class object?

I was not stingy with what the Xcode viewport does, I'm really curious as I suspect this confusion means I don't understand something.

the watch window in Xcode

+5
source share
2

, . . : objective-c?

, - NSObject, objective-c, NSObject ( NSObject) isa, .

+2

, , , isa Objective-C, Methods, . , , NULL

+1

All Articles