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
Is http stateful or stateless?
What is entity framework? : Entity framework
What are ajax helpers in mvc?
Explain something about model, view and controllers in asp.net mvc?
What is entitytype? : Entity framework
what is entityclient?
Do I need microsoft .net framework?
What is difference between razor and web form engine?
What operating systems will the .net framework 3.0 be available for?
what is use of entity container?
What is object service? : Entity framework
How the ‘page lifecycle’ of ASP.Net MVC does works?
What is the greatest advantage of using asp.net mvc over asp.net webforms?
What are the differences between Partial View and Display Template and Edit Templates in ASP.Net MVC?
Explain .Net Framework? Why we use it?