RtlDestroyHeap function

The RtlDestroyHeap routine destroys the specified heap object. RtlDestroyHeap decommits and releases all the pages of a private heap object, and it invalidates the handle to the heap.

Syntax

NTSYSAPI PVOID RtlDestroyHeap(
  PVOID HeapHandle
);

Parameters

HeapHandle

Handle for the heap to be destroyed. This parameter is a heap handle returned by RtlCreateHeap.

Return Value

If the call to RtlDestroyHeap succeeds, the return value is a NULL pointer.

If the call to RtlDestroyHeap fails, the return value is a handle for the heap.

Remarks

Processes can call RtlDestroyHeap without first calling RtlFreeHeap to free memory that was allocated from the heap.

Requirements

   
Windows version This routine is available on Microsoft Windows XP and later.
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL "< DISPATCH_LEVEL"

See Also

RtlAllocateHeap

RtlCreateHeap

RtlFreeHeap