Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We would be remiss if we finished this chapter without first trying to tie a couple of things together. Because the Objective-C language has the C language lying underneath, it's worthwhile mentioning some of the connections between the former and the latter. These are implementation details you can ignore or can use to perhaps give you a better understanding of how things work, in the same way learning that pointers are actually memory addresses can help give you a better understanding about pointers. We won't get too detailed here; we'll just state four facts about the relationship between Objective-C and C.
Fact #1: Instance variables are stored in structures. When you define a new class and its instance variables, those instance variables are actually stored inside a structure. That's how you can manipulate objects; they're really structures whose members are your instance variables. So, the inherited instance variables plus the ones you added in your class all comprise a single structure. When you alloc a new object, enough space is reserved to hold one of these structures.