garbage collection is the automatic memory management process run by the CLR in which GC traces the referance tree and remove those referances which are unused and the those referances which are set to null.
The automatic memory management scheme employed by the .NET Framework (CLR) is called garbage collection.
Unused memory is automatically reclaimed by garbage collection without interaction with the application
The garbage collector is a low-priority thread that always runs in the background of the application under normal circumstances. It operates when processor time is not consumed by more important tasks. When memory becomes limited however the garbage collector thread moves up in priority. Memory is reclaimed at a more rapid pace until it is no longer limited at which point the priority of garbage collection is again lowered.
CLR takes care of the garbage collection process. It calls the garbage collection manager which holds a stack of all the references made by your program. It first goes to the root directory of the application and checks for all the references and stacks them. It then free's all the references are are no loger in use.