Have you failed a job interview?
Send us your job interview questions and get correct answers.

What is the Garbage Collector in .NET Framework?

Experience Level: Medior
Tags: .NET

Answer

In .NET Framework the Garbage Collector is responsible for memory management - alocation and release of memory.

When an application creates a new instance of an object, the common language runtime (CLR) automatically allocates memory on the managed heap.

Later, when the object is released, the memory is no longer needed and it needs to be reclaimed for the future use. The process of reclaming unused memory is called garbage collection and it is taken care of by the Garbage Collector.

Comments

No Comments Yet.
Be the first to tell us what you think.