How does Garbage collector(GC) works in .net
Answer Posted / dilip tiwari
Basically Memory is divided into three part.Generation one,
Generation two and Generation three. Generation one is
small,Generation two is midium and generation three is
large in size, When we create any object by using new
keyword system will first calculate the bits require by the
object then check the bits avialble in memory (Generation
one) if bits found then allocate and point that using
Nextptrobj pointer. If there is no bits present then GC
come into picture. When GC run first it will check of
reference object know as GCRoot. These are by default
always reachable it mark these as live object. Then check
for objects pointed by these object it mark them also live
objects. It continue in this manner iterating through all
live object. As process finish all objects mark as live and
remaning objects are discarded from the memory and used by
the other objects.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What do you mean by serialize and marshalbyref?
Explain the server control events of asp.net ?
Describe the master page.
What are the built-in objects in asp.net?
What is the use of placeholder control? Can we see it at runtime?
What is the syntax for datagrid and specifying columns?
What is the page life cycle in asp.net?
Define page output caching?
Can anyone please tell me that the question posted on this website are Sufficient for the interview with 2+ year experience in .net
What is the advantage of mvc over asp.net? : Asp.Net MVC
What are the difference between function and stored procedure in .net programming language?
What is semantic gap?
Name the tools or API for developing or testing web api?
What is the purpose of session management?
What is Bundling and Minification in MVC?