HeapDestroy Function

Destroys the specified heap object. It decommits and releases all the pages of a private heap object, and it invalidates the handle to the heap.

Syntax

C++
BOOL WINAPI HeapDestroy(
  __in  HANDLE hHeap
);

Parameters

hHeap [in]

A handle to the heap to be destroyed. This handle is returned by the HeapCreate function. Do not use the handle to the process heap returned by the GetProcessHeap function.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

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

Examples

Enumerating a Heap

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

Heap Functions
HeapCreate
Memory Management Functions

Send comments about this topic to Microsoft

Build date: 9/17/2009

Tags :


Page view tracker