Binarysharp.MemoryManagement.Memory.MemoryCore.CloseHandle C# (CSharp) Méthode

CloseHandle() public static méthode

Closes an open object handle.
public static CloseHandle ( IntPtr handle ) : void
handle System.IntPtr A valid handle to an open object.
Résultat void
        public static void CloseHandle(IntPtr handle)
        {
            // Check if the handle is valid
            HandleManipulator.ValidateAsArgument(handle, "handle");

            // Close the handle
            if (!NativeMethods.CloseHandle(handle))
            {
                throw new Win32Exception(string.Format("Couldn't close he handle 0x{0}.", handle));
            }
        }