Export (0) Print
Expand All
Expand Minimize
2 out of 2 rated this helpful - Rate this topic

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


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 client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

HeapApi.h (include Windows.h);
WinBase.h on Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Heap Functions
HeapCreate
Memory Management Functions

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.