C# FAQ: What are the differences between CSharp and Java garbage collection

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
CSharp-Online.NET:FAQs
edit

What are the differences between C# and Java garbage collection?

On the Java platform, the Java Virtual Machine (JVM) manages the destruction of objects—garbage collection—by deleting objects which are no longer referenced. This occurs in a non-deterministic way.

Similarly, the .NET Common Language Runtime (CLR) handles garbage collection using a mark-and-compact algorithm.

The Garbage Collector is abbreviated GC.

See also


Personal tools