Chapter 13. Dispose, Finalize, and the Garbage Collector

Microsoft .NET Framework provides developers with an extraordinarily solid platform for creating and using a large variety of types. Developers who have struggled with memory leaks and buffer overflows will appreciate one feature of .NET: the Garbage Collector (GC). That’s actually the correct technical expression for the part of the Common Language Runtime (CLR) that identifies unneeded objects and disposes of them—when the time is right and .NET Framework needs storage space.

To explain how that works, I’ll revisit an old example used earlier ...

Get Microsoft® Visual Basic® 2010 Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.