O'Reilly logo

Visual Studio 2012 and .NET 4.5 Expert Development Cookbook by Abhishek Sur

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

Understanding .NET garbage collection and memory management

.NET memory management is actually not something we generally need to bother about. Any .NET application that runs, actually contains its own garbage collector which manages the memory used by the program and releases the memory when it is not required. There is a high-priority thread that runs under every process which is called the finalizer thread . This invokes itself automatically when there is high memory pressure or after a certain interval of time. The process of cleaning up memory has been done for the program using a unique algorithm to reclaim memory by creating a map of reachable objects and releasing all the memory that does not have its roots in the application:

When running ...

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