Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8966023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:56:06+00:00 2026-06-15T16:56:06+00:00

In the objective-c runtime, a class is represented by a structure like this: typedef

  • 0

In the objective-c runtime, a class is represented by a structure like this:

typedef struct class_t {
    struct class_t *isa;    // Points to the class' meta class
    struct class_t *super;  // Points to the class' super class
    Cache cache;
    IMP *vtable;
    union {
        class_ro_t *rodata;
        class_rw_t *rwdata;
    };
} class_t;

When a MyClass class is a root class and not a meta class, its super member is a NULL pointer (which is understandable, since it is a root class, so it doesn’t have a super class).
However, if we get the isa member of that same MyClass root class (which points to MyClass‘ meta class), and we get the super member of that isa member, it is not a NULL pointer, but a pointer to MyClass (not meta class). Shouldn’t the super class of a meta class of a non-meta root class be a NULL pointer (as the super class of a non-meta root class is)?
Since it’s not, for what is it supposed not to be?

I’m asking this because, the way things are actually, if methodX is an instance method (not a class method) of a MyClass root class, the statement [MyClass methodX]
would call methodX (and it actually does), what shouldn’t happen (again, because methodX is a instance method, not a class method, so it should not respond to the [MyClass methodX] statement).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:56:08+00:00Added an answer on June 15, 2026 at 4:56 pm

    The Obective-C language specifically decided that class objects should respond to the instance methods of their root class. This is primarily a pragmatic decision; since NSObject is mostly responsible for handling the fundamentals of how ObjC interacts with objects, it would be annoying to have to implement everything twice; once for class objects and once for instances. Class objects can be put into arrays, etc. so they need to respond to -retain and -release just like instances do.

    You can read more about it in the “Methods of the Root Class” section of this document: https://developer.apple.com/library/ios/DOCUMENTATION/Cocoa/Conceptual/ObjectiveC/Chapters/ocObjectsClasses.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the Modern Objective-C runtime, you can do something like this: @interface MyClass :
How can I invoke a method at runtime on an Objective-C class when all
I'd like to write an Objective-C class without Cocoa or GNU's Object.h (for educational
One of my entity managed objects need to setup a runtime-only tree-like structure where
I tried to list all properties of an Objective-C class like described in the
I want to know how objective C runtime handle arguments when I call a
I've found what I think may be a bug with Ivar and Objective-C runtime.
I want to add scripting support for an Objective-C project using the objc runtime.
Using the Objective-C Runtime, how do I add the method +layerClass to the private
Here Understand Objective-C runtime is my question about how objective-c runtime work. What I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.