HGlobalSafeHandle

Ecng.Interop

Represents a safe handle for unmanaged memory allocated with HGlobal.

Herda de: SafeHandleZeroOrMinusOneIsInvalid

Construtores

HGlobalSafeHandle
public HGlobalSafeHandle(IntPtr ptr)
hGlobalSafeHandle = HGlobalSafeHandle(ptr)

Initializes a new instance of the HGlobalSafeHandle class with the specified pointer.

ptr
An IntPtr that represents the allocated unmanaged memory.

Métodos

ReleaseHandle
protected override bool ReleaseHandle()
result = hGlobalSafeHandle.ReleaseHandle()

Releases the unmanaged memory by freeing the HGlobal allocation.

Retorna: true if the handle is released successfully; otherwise, false.