Posts tagged: Dispose

How to improve garbage collection performance

By , March 6, 2011

Introduction
DotNet developers can free themselves from tedious memory management for their application as Microsoft Framework and CLR do it automatically.CLR provides a mechanism called as Garbage Collection which manages your applications memory. In this session we will discuss   how garbage collector works and how it affects the performance of your Applications.

When you create an object using new () operator, the object’s memory is obtained from the managed heap. When the garbage collector decides that sufficient garbage has accumulated, it performs a collection to free some memory. This process is fully automatic, but there are a number of factors that you need to be aware of that can make the process more or less efficient. Read more »

Avoid Memory Leaks with Destructor and Dispose

By , October 25, 2009

custom destructor and standard Dispose, but the second class doesn’t need either. The difference is that the first class allocates
resources in the constructor and doesn’t clean them up immediately. In contrast, the second class allocates resources in a member function and carefully frees them before exiting (using a finally block), so the second
class author doesn’t need to bother writing Dispose and a destructor. Read more »