Showing posts with label garbage collection. Show all posts
Showing posts with label garbage collection. Show all posts

Thursday, February 10, 2011

Heap Based Classes and Garbage Collection

In Java objects are created on the heap using the new keyword. Most classes in C# are created on the heap by using the new keyword. Also just as the JVM manages the destruction of objects so also does the CLR via a Mark and Compact garbage collection algorithm

NOTE: C# also supports stack-based classes, called value types.