New Dispose Guidelines

Joe Duffy has posted the revised Dispose, Finalization, and Resource Management Design Guideline. It’s a great (and long) read. Check it out!

0

The Truth About GCHandles

I’ve heard several people asking why GCHandle doesn’t implement IDisposable, considering it wraps an unmanaged resource (a handle) and needs to be explicitly freed (using GCHandle.Free()). Before I explain the reason, I want to give a little background on GCHandles and their dangers. What’s a GCHandle? A GCHandle is a struct that contains a handle…

6

Brian Talks About SafeHandles

A great post on the BCL Team Blog by Brian Grunkmeyer about SafeHandles. He explains in-depth the topic I brought up ago a few posts ago about mitigating race conditions with the finalizer. Definitely worth a read.

0

How To Tell Which GC Mode Your Application Is Using

I posted previously about how to set the GC mode your application.  So now that you’re running your app, how do you know it’s running in that GC mode? If you’re using v1.0 or v1.1, the CLR loads a different dll based on which GC mode (mscorwks.dll for workstation, mscorsvr.dll for server).  You can use…

8