IMalloc::Free method (objidlbase.h)

Frees a previously allocated block of memory.

Syntax

void Free(
  [in] void *pv
);

Parameters

[in] pv

A pointer to the memory block to be freed. If this parameter is NULL, this method has no effect.

Return value

None

Remarks

This method frees a block of memory previously allocated through a call to IMalloc::Alloc or IMalloc::Realloc. The number of bytes freed equals the number of bytes that were allocated. After the call, the block of memory pointed to by pv is invalid and can no longer be used.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header objidlbase.h (include ObjIdl.h)

See also

CoTaskMemFree

IMalloc