.Net - Explain how garbage collection manages the reclamation of
unused memory. - June 03, 2009 at 11:00 AM by Shuchi Gauri
Explain how garbage collection manages the reclamation of unused memory.
The garbage collector assumes that all objects in the managed heap are garbage.
It starts walking the roots and builds a graph of all objects reachable from
the roots recursively. It stops when it attempts to add an object to the graph
that it previously added. The graph contains the set of all objects that are
reachable from the application's roots. Any object/s that is not in the graph
is not accessible by the application, and is considered garbage. Collection
only occurs when the heap is full. In such a case, each and every garbage
object calls the Finalize method and reclaims the unused memory.
Also read
A circular reference is a run-around wherein the 2 or more resources are
interdependent on each other rendering the entire chain of references to be
unusable................
What is a CLR (Common Language Runtime)?
Explain the concepts of CTS and CLS(Common Language Specification).
Explain the concepts and capabilities of Assembly in .NET
What is Manifest in .NET?
What is GAC in .NET?
What is garbage collection? How to force garbage collector to run?
Explain the different types of JIT in MS .NET..................
What is garbage collection?
Is it possible to force garbage collection to run?
Define Dispose().
Explain how garbage collection manages reclamation of unused memory in .NET.
Explain how garbage collection deals with circular references..................
The LeaseTime property protects the object so that the garbage collector does
not destroy it as remoting objects are beyond the scope of the garbage
collector.................
|