IMalloc::Free

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method frees a previously allocated block of memory.

Syntax

void Free(
  void* pv 
);

Parameters

  • pv
    [in] Pointer to the memory block to be freed.

Return Value

None.

Remarks

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

Note

The pv parameter can be NULL. If so, this method has no effect.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

Header objidl.h, objidl.idl
Library ole32.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IMalloc::Alloc
IMalloc::Realloc
CoTaskMemFree