30-10-2009, 03:34 PM
Abstract
Garbage Collection is an automatic memory management mechanism in .NET. This mechanism helps to free the memory automatically when they are no longer used by the application. The advantage is that developers need not worry about the memory management when writing the code i.e. the GC will do it for you as and when needed.Manual memory management that is done in c and c++ language is (programmer-)time consuming, and error prone.Hence .Net Framework provides with automatic garbage collection to avoid the above problem.And this is implemented through a garbage collection algorithm which says how resources can clean up properly when the garbage collector decides to free a resourceâ„¢s memory and how to force an object to clean up when it is freed and uses object generation to improve the performance.
[attachment=336]