Chapter 8. Understanding Object Lifetime

At this point in the text, you have learned a great deal about how to build custom class types using VB 2010. Now you will see how the CLR manages allocated class instances (aka, objects) via garbage collection. VB 2010 programmers never directly deallocate a managed object from memory (recall there is no Delete keyword in the VB 2010 language). Rather, .NET objects are allocated to a region of memory termed the managed heap, where they will be automatically destroyed by the garbage collector "sometime in the future."

Once you have looked at the core details of the collection process, you'll learn how to programmatically interact with the garbage collector using the System.GC class type. Next, you'll examine ...

Get Pro VB 2010 and the .NET 4 Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.