Chapter 21. The Managed Heap and Garbage Collection
In this chapter:
In this chapter, I’ll discuss how managed applications construct new objects, how the managed heap controls the lifetime of these objects, and how the memory for these objects gets reclaimed. In short, I’ll explain how the garbage collector in the common language runtime (CLR) works, and I’ll explain various performance issues related to it. I’ll also discuss how to design applications so that they use memory most efficiently.
Managed Heap Basics
Every program uses resources of one sort or another, be they files, memory buffers, ...