Explain the basic functionality of garbage collector

Showing Answers 1 - 12 of 12 Answers

sunitha

  • Jan 1st, 2007
 

Garbage collector is mainly used for automatic memory management.It is used to monitor leaked and unused memory objects that are loaded into memory.garbage collector releases memory objects.If  they are not in use for a longer period.

system.gc.collect() is method used to release the memory resources programatically.

hansat

  • Jan 2nd, 2007
 

Garbage collector is a process which is resides in memory and it clears memory when more space is not available on the memory it removes the objects which are not refrenced.

shyamvyas

  • Feb 7th, 2007
 

Garbage Collector in .Net Framework is used for Automatic Memory Management i.e. it is collect all unused memory area and give to application. system.gc.collect() is a method for release the memory. But remember one think, it is only an request, i.e. we can't explicitly release the memory by using system.gc.collect().

kirangiet

  • Oct 21st, 2009
 

Memory Management a part of CLR functionality is a important aspect in .NET.
Garbage Collector well known as GC is the one responsible for Memory Management.


GC Runs periodically through Managed Heap (Which is divided into 3
Generations) and find the object which doesn't contain any reference. It then
collect those objects to free Managed Heap. After collecting the unreferenced
object, GC will then Defragment Managed Heap in order to get continuous block of
memory.


GC.Collect() is a method used to call GC exclusively. However it is
recommended not to use this method often, as it will promote the object left in
Heap to higher generation.


Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions