What is GC (Garbage Collection) and how it works



What is GC (Garbage Collection) and how it works..

Answer / kirti

One of the good features of the CLR is Garbage Collection, which runs in the background collecting unused object references, freeing us from having to ensure we always destroy them. In reality the time difference between you releasing the object instance and it being garbage collected is likely to be very small, since the GC is always running.

[The process of transitively tracing through all pointers to actively used objects in order to locate all objects that can be referenced, and then arranging to reuse any heap memory that was not found during this trace. The common language runtime garbage collector also compacts the memory that is in use to reduce the working space needed for the heap.]

Heap:

A portion of memory reserved for a program to use for the temporary storage of data structures whose existence or size cannot be determined until the program is running.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net Framework Interview Questions

what is minimum requirement for entity framework applications to run?

0 Answers   Microsoft,


What is Partial Assembly References?

3 Answers   Microsoft,


Difference between ASP.NET MVC and ASP.NET WebForms?

0 Answers  


what is entity sql?

0 Answers   Microsoft,


If you change something in web.config file.Do u need to compile again?

5 Answers   Broadridge, SMNetserv,






What is Area in ASP.Net MVC?

0 Answers  


I can't be bothered with all this CAS stuff. Can I turn it off

1 Answers  


what are background threads? give ex?

3 Answers   CSC, Kanbay,


Why to use “{resource}.axd/{*pathinfo}” in routing in mvc?

0 Answers  


How to set the debug mode

1 Answers   4Cplus,


Where The Inheritence is useful?How we decide the situation of inheritence

2 Answers  


explain what is ado.net entity framework?

0 Answers   Microsoft,


Categories