How does memory layout of Objective-C objects work internally?

Updated May 17, 2026

Short answer

Objective-C objects are structs in heap memory starting with isa pointer followed by ivars.

Deep explanation

An object’s memory begins with isa pointer, followed by instance variables laid out in class-defined order with padding for alignment. ARC manages lifetime but not layout. Modern runtimes may optimize with tagged pointers for small objects like NSNumber.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More Objective-C interview questions

View all →