What is garbage collection?
Explain the difference among garbage collections in .NET 4.0 and earlier versions.
Garbage collection stops memory leaks during execution of programs. Garbage collector is a low-priority process that manages the allocation and deallocation of memory for your application. It checks for the unreferenced variables and objects. If GC searches any object that is no longer used by the application, it frees up the memory from that object.