HeapFree

HeapFree frees a memory block allocated from a heap by HeapAlloc or HeapReAlloc.

Syntax

BOOL HeapFree(
    HANDLE hHeap,
    DWORD Flags,
    LPVOID lpMem
);

Parameters

hHeap

The heap whose memory block the function frees. This parameter is the handle returned by GetProcessHeap.

Flags

Ignored.

lpMem

A pointer to the memory block to free. This pointer is returned by HeapAlloc or HeapReAlloc.

Return Value

TRUE if the function succeeds, FALSE if the function fails

To get extended error information, call GetLastError.

Requirements

Minimum Supported Version RTX64 2013
Header windows.h
Library Rtx_Rtss.lib

See Also:

GetProcessHeap

HeapAlloc

HeapReAlloc

HeapSize

SetLastError