Garbage Collection & Metadata

Garbage Collection

Garbage collection is the mechanisam to releasing memory from unused objects and components of the application.

Language such as C++ does not have any garbage collection system, therefor developers have to manually clean the memory. Visual Basic provides automatically a Garbage collection system.

In .Net Framework, the garbage collector is implemented as a separate thread. This thread will always be running at the back end.


Metadata means data about data. Metadata in .Net is binary information that describes the characteristics of data.

It contains information about the description of the assembly, data types, members with their declaration, references, security permission, etc.

During the run time JIT uses both metadata & MSIL code and converts into native code.

MSIL :- Microsoft Intermediate Language

JIT :- Just-in-time