O'Reilly logo

Microsoft® Visual Basic® 2010 Developer’s Handbook by Klaus Löffelmann and Sarika Calla Purohit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

New or Not New: About Objects and Reference Types

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required