What is garbage collection?

 Posted by Rohitshah on 10/7/2008 | Category: C# Interview questions | Views: 7949
Answer:

Garbage collection is a mechanism that allows the computer to detect when an object can no longer be accessed. It then automatically releases the memory used by that object (as well as calling a clean-up routine, called a "finalizer," which is written by the user). Some garbage collectors, like the one used by .NET, compact memory and therefore decrease your program's working set.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response