Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/System.Private.CoreLib/src/System/Runtime/InteropServices/CriticalHandle.cs')
-rw-r--r--src/System.Private.CoreLib/src/System/Runtime/InteropServices/CriticalHandle.cs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CriticalHandle.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CriticalHandle.cs
index 61f5b8bfb..ed2f7513b 100644
--- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CriticalHandle.cs
+++ b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CriticalHandle.cs
@@ -2,10 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-//
-
-//
-
/*============================================================
**
**
@@ -50,18 +46,19 @@
===========================================================*/
using System;
+using System.IO;
+using System.Reflection;
using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
using System.Runtime.Versioning;
-using System.Reflection;
using System.Threading;
-using System.Runtime.ConstrainedExecution;
/*
Problems addressed by the CriticalHandle class:
1) Critical finalization - ensure we never leak OS resources in SQL. Done
without running truly arbitrary & unbounded amounts of managed code.
2) Reduced graph promotion - during finalization, keep object graph small
- 3) GC.KeepAlive behavior - P/Invoke vs. finalizer thread race (HandleRef)
+ 3) GC.KeepAlive behavior - P/Invoke vs. finalizer thread race condition (HandleRef)
4) Enforcement of the above via the type system - Don't use IntPtr anymore.
Subclasses of CriticalHandle will implement the ReleaseHandle
@@ -240,7 +237,7 @@ namespace System.Runtime.InteropServices
// that no jit allocations etc. will occur, but don't allocate memory unless
// you can deal with the failure and still free the handle).
// The boolean returned should be true for success and false if a
- // catastrophic error occured and you wish to trigger a diagnostic for
+ // catastrophic error occurred and you wish to trigger a diagnostic for
// debugging purposes (the SafeHandleCriticalFailure MDA).
protected abstract bool ReleaseHandle();
}