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 is ViewData and TempData in ASP.Net MVC?
How do I use partial view?
Explain the advantages of asp.net mvc over asp.net?
Why to use “{resource}.axd/{*pathinfo}” in routing in mvc?
What are the new enhancements done in default project template of asp.net mvc 4?
What is entity framework firstordefault?
How can we determine action invoked from HTTP GET or HTTP POST?
What is entitycontainer? : Entity framework
Where is the new functionality in the .net framework 3.0 (such as wcf, wf, wpf, and cardspace) installed to? Is that different from where the .net framework 2.0 is installed to?
what is more complex to implement property, methods or event? how can I define criteria to compare the difficulty of implementation between them? for example the number of methods wanted to implements property is 2 methods. how many methods I need it to implements events?
Can you explain model, controller and view in mvc?
Explain what platforms does the .net framework run on?
What is .net framework in simple terms?
Which .net framework is installed?
What is entityset? : Entity framework