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

  • Home
  • SEARCH
  • 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 8589637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:06:17+00:00 2026-06-11T23:06:17+00:00

My understanding of the Objective-C id type is that it’s a pointer to an

  • 0

My understanding of the Objective-C id type is that it’s a pointer to an object of unknown type. In my eyes it’s like a void* for Objective-C classes with some compiler sugar on top for stuff like type checking. My question is why is it not id* instead of id then since it is a pointer type? If this were Java or C# where object references aren’t declared using an * then I wouldn’t be so surprised. But in Objective-C, every class is referenced by C-style pointers, so why hide the * for the unknown object type?

  • 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-11T23:06:18+00:00Added an answer on June 11, 2026 at 11:06 pm

    The id typedef is already a pointer:

    typedef struct objc_object {
        Class isa;
    } *id;
    

    From the Objective-C Programming Language:

    In Objective-C, object identifiers are of a distinct data type: id.
    This type is the general type for any kind of object regardless of
    class and can be used for instances of a class and for class objects
    themselves.

    id anObject;
    

    For the object-oriented constructs of Objective-C, such
    as method return values, id replaces int as the default data type.
    (For strictly C constructs, such as function return values, int
    remains the default type.)

    The keyword nil is defined as a null object, an id with a value of 0.
    id, nil, and the other basic types of Objective-C are defined in the
    header file objc/objc.h.

    id is defined as pointer to an object data structure:

    typedef struct objc_object {
        Class isa;
    } *id;
    

    Every object thus has an isa variable that tells it of what class it is an instance. Since the Class type is itself
    defined as a pointer:

    typedef struct objc_class *Class;
    

    the isa variable is frequently
    referred to as the “isa pointer.”

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

Sidebar

Related Questions

I am having some trouble understanding designated initializers. I am studying Objective C from
I have a piece of Objective-C code that looks like the following: - (NSString
In Objective-C, my understanding is that the directive @"foo" defines a constant NSString. If
Until five minutes I was sure that my understanding about Objective c reference counting
I was just writing some exploratory code to solidify my understanding of Objective-C and
I'm new to Objective-C and I am having some difficulty with understanding memory management.
I need some help with understanding the class declaration syntax in Objective C, or
I have started learning Objective-C, and I just wanted to verify that my understanding
I am fairly new to objective-c and am having trouble understanding the warning message
Understanding that I should probably just dig into the source to come up with

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.