HeapFree
E724273
HeapFree is a Windows API function that releases a memory block previously allocated from a specified heap.
Statements (47)
| Predicate | Object |
|---|---|
| instanceOf |
Windows API function
ⓘ
heap management function ⓘ |
| applicableTo |
default process heap
ⓘ
process private heaps ⓘ |
| belongsToFamily | Windows Heap Functions NERFINISHED ⓘ |
| category | Memory management API ⓘ |
| commonlyUsedWith |
HeapAlloc
ⓘ
HeapCreate ⓘ HeapDestroy NERFINISHED ⓘ HeapReAlloc ⓘ |
| declaredInHeader | heapapi.h ⓘ |
| documentationSite | Microsoft Learn NERFINISHED ⓘ |
| effect |
may trigger heap consistency checks depending on flags
ⓘ
releases memory back to the heap ⓘ |
| errorCondition |
fails if hHeap is not a valid heap handle
ⓘ
fails if lpMem is not a valid block in the specified heap ⓘ |
| errorReporting | GetLastError can be called when HeapFree fails ⓘ |
| exportedBy | Kernel32.dll NERFINISHED ⓘ |
| freesMemoryBlock | previously allocated heap block ⓘ |
| freesMemoryFrom | specified heap ⓘ |
| hasCallingConvention | WINBASEAPI ⓘ |
| hasLanguageBinding |
C
ⓘ
C++ NERFINISHED ⓘ |
| hasParameter |
DWORD dwFlags
ⓘ
HANDLE hHeap ⓘ LPVOID lpMem ⓘ |
| hasReturnType | BOOL ⓘ |
| introducedFor | Win32 API NERFINISHED ⓘ |
| linkage | import library Kernel32.lib ⓘ |
| parameterRole |
dwFlags specifies heap free options
ⓘ
hHeap identifies the heap from which the memory was allocated ⓘ lpMem points to the memory block to be freed ⓘ |
| platform |
Windows desktop applications
ⓘ
Windows server applications ⓘ |
| relatedConcept |
dynamic memory management
ⓘ
heap corruption detection ⓘ |
| requiresHeader | windows.h ⓘ |
| returnsOnFailure | zero ⓘ |
| returnsOnSuccess | nonzero value ⓘ |
| runsOn | Microsoft Windows NERFINISHED ⓘ |
| supportsFlag |
HEAP_FREE_CHECKING_ENABLED
ⓘ
HEAP_NO_SERIALIZE ⓘ HEAP_TAIL_CHECKING_ENABLED ⓘ |
| threadSafety | depends on heap serialization options ⓘ |
| usageConstraint |
behavior is undefined if lpMem is invalid or already freed
ⓘ
hHeap must be a valid heap handle ⓘ lpMem must be a pointer returned by a heap allocation function for the same heap ⓘ |
Referenced by (1)
Full triples — surface form annotated when it differs from this entity's canonical label.