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

Class Constructors: Defining What Happens in New

When instantiating a class into an object, the .NET Framework first creates the appropriate amount of memory space for the field variables on the Managed Heap (it’s actually the Common Language Runtime [CLR] that controls this process). There are a few other things happening internally, which are responsible for managing the object on the Managed Heap, but that’s it for now.

In many cases, however, a certain amount of housekeeping work is necessary to prepare the class to function correctly. For example, think of what happens when you instantiate a new button for your Windows Forms application: the infrastructure creates enough space on the Managed Heap for the data (which holds the control information ...

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