What is garbage collection in .net? Explain the garbage collection process?
Answer / Abhinav Singh
Garbage Collection (GC) is a mechanism in .NET that automatically reclaims memory used by objects that are no longer in use. The process involves three main phases: 1) Garbage Collection (GC) - identifies and marks all live objects, 2) Rooting - finds the roots (variables still referencing these objects), and 3) Compacting - moves all live objects to free up memory for new ones.nnThe .NET garbage collector runs periodically or when memory usage exceeds a certain threshold. It's crucial for memory management in .NET applications.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the contents of assembly?
What is heap and what is stack?
How to convert a .NET object into COM operabililty?
1 Answers Petranics Solutions,
What is static constructor, when it will be fired?
State the methods used during deserialization and serialization process.
What is assembly in .net?
What are server controls?
What is jit compilers?
What is 'Common Type System' (CTS) in .NET?
Please explain what is the difference between constants and read-only variables?
What are two different types of remote object creation mode in .net?
How can you automatically generate interface for the remotable object in .NET with Microsoft tools?