Showing results for August 10, 2010 - The Old New Thing

Aug 10, 2010
Post comments count0
Post likes count0

Everybody thinks about CLR objects the wrong way (well not everybody)

Raymond Chen
Raymond Chen

Many people responded to Everybody thinks about garbage collection the wrong way by proposing variations on auto-disposal based on scope: "Any local variable that is IDisposable should dispose itself when it goes out of scope." "You should be able to attach an attribute to a class that says the destructor should be called imme...

Other
Aug 10, 2010
Post comments count0
Post likes count0

When does an object become available for garbage collection?

Raymond Chen
Raymond Chen

As we saw last time, garbage collection is a method for simulating an infinite amount of memory in a finite amount of memory. This simulation is performed by reclaiming memory once the environment can determine that the program wouldn't notice that the memory was reclaimed. There are a variety of mechanism for determining this. In a basic tracing...

Other