.Net Garbage Collection
The .Net Framework provides a new mechanism for releasing unreferenced objects from the memory (that is we no longer needed that objects in the program) ,this process is called Garbage Collection (GC). When a program creates an Object, the Object takes up the memory. Later when the program has no more references to that Object, the Object's memory becomes unreachable, but it is not immediately freed. The Garbage Collection checks to see if there are any Objects in the heap that are no longer being used by the application. If such Objects exist, then the memory used by these Objects can be reclaimed. So these unreferenced Objects should be removed from memory , then the other new Objects you create can find a place in the Heap.
The reclaimed Objects have to be Finalized later. Finalization allows a resource to clean up after itself when it is being collected. This releasing of unreferenced Objects is happening automatically in .Net languages by the Garbage Collector (GC). The programming languages like C++, programmers are responsible for allocating memory for Objects they created in the application and reclaiming the memory when that Object is no longer needed for the program. In .Net languages there is a facility that we can call Garbage Collector (GC) explicitly in the program by calling System.GC.Collect.
- What is Microsoft .Net Framework
- what are the functions of microsoft .net framework?
- Common Language Runtime in .Net Framework
- How to Common Language Runtime
- What is .Net Framework Class Library
- What is Common Language Specification
- What is Common Type System
- What is Microsoft Intermediate Language
- What is Portable Executable (PE) File Format
- What is Microsoft Just In Time Compiler
- How to Managed Code - Microsoft .Net Framework
- What is .Net Framework Metadata
- what is .Net Framework Assembly
- What is Assembly Manifest
- What is Global Assembly Cache
- What is a .Net Satellite Assembly?
- What are the contents of an Assembly?
- How to Private Assembly and Shared Assembly
- What is Microsoft .Net Strong Name
- What is .Net Namespaces
- What is Application Domain
- What is Code Access Security
- .Net Threads