The garbage collector is one of the main components of the Common Language Runtime: it controls how managed memory is allocated and when it is released.
Some aspects of the garbage collector can be controlled by the System.GC class which also provides information such as the total amount of memory that is available in a system.