HGlobalSafeHandle
Ecng.Interop
Represents a safe handle for unmanaged memory allocated with HGlobal.
継承元: SafeHandleZeroOrMinusOneIsInvalid
コンストラクター
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.
メソッド
ReleaseHandle
protected override bool ReleaseHandle()
result = hGlobalSafeHandle.ReleaseHandle()
Releases the unmanaged memory by freeing the HGlobal allocation.
戻り値: true if the handle is released successfully; otherwise, false.