HeapDestroy

HeapDestroy destroys the specified heap object. It uncommits and releases all the pages of a private heap object and it invalidates the handle of the heap.

Syntax

Copy
BOOL HeapDestroy(
    HANDLE hHeap
);

Parameters

hHeap

The heap to be destroyed. This parameter should be a heap handle returned by HeapCreate. A heap handle returned by GetProcessHeap should not be used.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE.

To get extended error information, call GetLastError.

Remarks

Processes can call HeapDestroy without first calling HeapFree to free memory allocated from the heap.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

windows.h rtkrnl.lib

See Also: