Class HGlobalSafeHandle
Represents a safe handle for unmanaged memory allocated with HGlobal.
public class HGlobalSafeHandle : SafeHandleZeroOrMinusOneIsInvalid, IDisposable
- Inheritance
-
HGlobalSafeHandle
- Implements
- Inherited Members
- Extension Methods
Constructors
HGlobalSafeHandle(IntPtr)
Initializes a new instance of the HGlobalSafeHandle class with the specified pointer.
public HGlobalSafeHandle(IntPtr ptr)
Parameters
Methods
ReleaseHandle()
Releases the unmanaged memory by freeing the HGlobal allocation.
protected override bool ReleaseHandle()
Returns
- bool
true if the handle is released successfully; otherwise, false.