Manually decrements the reference counter on a SafeHandle instance.
Assemblies: mscorlib (in mscorlib.dll)
System.Runtime.Handles (in System.Runtime.Handles.dll)
This method is intended for advanced users and must always be used carefully. To avoid leaking handle resources, always call this method inside a constrained execution region (CER), where a thread abort cannot interrupt processing. In the same way that unmatched DangerousAddRef calls can cause resource leaks, unmatched calls can cause invalid handle states to become visible to other threads. Do not expose DangerousAddRef or calls to untrusted code.