IMalloc::Free method

Frees a previously allocated block of memory.

Syntax

void Free(
  void *pv
);

Parameters

pv

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

Return Value

This method does not return a value.

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

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

See Also

CoTaskMemFree

IMalloc