Garbage Collection (C# vs Java)
Full Name:
Garbage Collection (C# vs Java)
Short Name:
Garbage Collection (C# vs Java)
Type of Entity:
C#
Abstract:
In C and C++, many objects require the programmer to allocate their resources once declared, before the objects can be safely used. Releasing these resources back to the free memory pool once the object has been used is also the responsibility of the programmer. If resources are not released, the code is said to leak memory, as more and more resources are consumed needlessly. On the other hand, if resources are released prematurely, loss of data, the corruption of other memory areas, and null pointer exceptions can occur.
MSDN Source URL:
http://msdn2.microsoft.com/ms228629.aspx