Garbage collector runs - Csharp.Net
Q. When the garbage collector runs.- Published on 31 Aug 15
a. It runs automatically
c. Every alternate day
d. When IIS restart.
ANSWER: It runs automatically
We create the object, use it and generally forget to delete. Garbage collector is automatic memory management process that releases the memory used by the objects. Garbage collector runs automatically and it checks for objects in the managed heap that are no longer being used by the application and performs the necessary action to regain memory.
It allows us to develop an application without having worry to free memory.