How does Garbage collector(GC) works in .net

Answer Posted / archana

In .NET Garbage Collector maintained by CLR. The process of
GC is reclaim the memory of objets which is no longer
referenced by our program.Next thing is GC runs
undeterministicly because of that we can't assure we the
object will be released from the Heap Location.But the CLR
maintain a Logical Pointer to every object which referenced
by our program. In some amount of time the GC look out the
objects which is reachable from Logical Pointer. whatever
the object reachable from pointer it create a map those
objects. After that it will reclaim the memory of objects
those are not reachable from the pointer.This is the
process of how the GC clear the memory of Object.

Is This Answer Correct ?    43 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define managed code and managed data in .net?

513


Define web services in asp.net.

560


How many ways are there to maintain a state in .net? What is view state?

590


What is session in asp.net?

527


What is repository pattern in mvc.net? : asp.net mvc

528






What is variable and constant in .net programming language?

397


How response object is related to asp's response object?

521


What r the asp.net list controls and diff. Between them?

507


What are assemblies and namespaces and explain the difference between them ?

570


Can you explain architecture of your project ?

616


What is server components?

538


What are the advantages of Web API?

636


Which is faster viewbag or viewdata?

565


Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnected environment) and you are making changes to the the grid but before updating the database if any other user modify the data, how will you avoid such problem?

1719


Why session is more secure than cookies?

502