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

Explain what languages does the .net framework support?

0 Answers  


What is mvc entity framework?

0 Answers  


How to create an alias name for a namespace?

4 Answers   IBM,


What is GUID and why we need to use it and in what condition? How this is created

1 Answers  


Have you designed any components?

2 Answers   HP,






Can source code be reverse-engineered from IL?

2 Answers  


What is entity client data provider? : Entity framework

0 Answers  


What are Resource Files ? How are they used in .NET

1 Answers  


Can I add asp.net mvc testcases in visual studio express?

0 Answers  


What is conceptual model? : Entity framework

0 Answers  


Why is XmlSerializer so slow

1 Answers  


what are background threads? give ex?

3 Answers   CSC, Kanbay,


Categories