public static void SafeDispose(this SafeHandleBase handle)
        {
            if (handle == null || handle.IsInvalid)
            {
                return;
            }

            handle.Dispose();
        }
Exemple #2
0
 internal void RegisterForCleanup(SafeHandleBase handleToCleanup)
 {
     handlesToCleanup.Push(handleToCleanup);
 }