What is a Garbage Collector?
Garbage collection is a .Net feature to free the unused code objects in the memory. The memory heap is divided into three generations. Generation 0, Generation 1 and Generation 2. Generation 0 – This is used to store short-lived objects. Garbage Collection happens frequently in this Generation. Generation 1 – This is for medium-lived objects. … Read more