Simple Stack & Heap Allocation With Garbage Collection

Destructors

Here is another simple program that shows how Garbage Collection works in C# .NET. What I’m doing is creating a couple of objects, showing how GC memory there is upon creation, destroying the object so it’s flagged for GC collection, and showing the GC memory after the object has been destroyed. Click more to see the source code.

Continue reading

Advertisements