Day 20-Garbage Collection in C#

Unused object automatically released by automatic garbage collection in Asp.Net

Garbage collector executes automatically when system has low physical memory.

Advantage of Garbage Collector
1. No worry about memory management

2. Allocate object memory on managed heap efficiently.

3. Reclaims objects that no longer being used, clears their memory and keeps the memory for future allocations.

4. Provides memory safety by making sure that object cannot use the content of other object.