To make all of the later chapters easier to comprehend, it makes sense to talk a bit about saving objects; in other words, instances of classes. Object variables and objects aren’t really as connected as you might think. In fact, it’s just the opposite.
In reality, this is how it works: an object variable basically only saves a memory address pointer (typically just called a pointer) to the actual data in a specially monitored part of the main memory—the Managed Heap. Figure 8-4 and Figure 8-5 demonstrate that the data of the objects you are instantiating from classes by using the New keyword are placed in this Managed Heap.
Figure 8-4. During instantiation, part of the main memory is taken away ...
No credit card required