Overview of Resource Management in the .NET Framework

As you are probably aware, the CLR takes an active role in managing the lifetime of objects that your application allocates. Actively managing objects is based on the premise that every object requires memory. It is the CLR's job to manage the allocation and deallocation of memory in an efficient and timely manner. In addition, every object requires that the memory associated with it be initialized. The programmer must properly initialize the object; the CLR cannot and should not interfere with this process. The .NET Framework requires that all objects be allocated from a managed heap. Each language expresses this allocation and initialization differently, but the concept is the same. For ...

Get .NET Common Language Runtime Unleashed 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.