SafeHandle: A Reliability Case Study
Constrained Execution Regions and other errata
Various SafeHandle types
Can I use SafeHandle instead of IntPtr?
One thing to derive from those is that, perhaps, one could (should?) wrap the IntPtrs to SafeHandle. For instance, the ones pointing to Socket to SafeHandleMinusOneIsInvalid (or to a derived one) as it looks like one should check for SOCKET_ERROR, which looks like defined to -1. The Orleans link may contain other interesting pointers, perhaps one is Microsoft.IO.RecycableMemoryStream.
But I think I've spent all the good will there has ever been now and leave.