How Garbage Collector identifies the objects which are not
in use?
Answer Posted / rahul veer
Garbage Collector determines which objects are no longer
being used by examining the application's roots. In Dot Net
each and every application has a set of roots. Each root
either refers to an object on the managed heap or is set to
null. An application's roots include global and static
object pointers, local variables and reference object
parameters on a thread's stack, and CPU registers. The
garbage collector has access to the list of active roots
that the just-in-time (JIT) compiler and the runtime
maintain. Using this list, it examines an application's
roots, and in the process creates a graph that contains all
the objects that are reachable from the roots. Objects that
are not in the graph are unreachable from the application's
roots. The garbage collector considers unreachable objects
as garbage and not in use.
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
What are child actions in ASP.Net MVC?
Is it possible to unit test an mvc application without running the controllers in an asp.net process?
How does servicing work for the .net framework 3.0? If I install the .net framework 3.0, can I get service updates for the .net framework 2.0?
What is a model in programming?
Describe the gac in the .net framework.
How do you handle variable number of segments in a route definition?
What are the 2 ways of adding constraints to a route?
what is lazy loading in entity framework?
Can we have enum in entity framework?
How can I tell what .net framework is installed?
How to Redirect Tracing to a File
what is dot net? what is use dot net? what is benifit of dot net?what is vb dot net? what is ado dot net? what is c#?
what is client wins and store wins mode in entity framework concurrency?
What are the versions of .net framework?
What is the significance of nonactionattribute?