CoTaskMemFree
CoTaskMemFree is a Windows API function used to release memory that was allocated by the COM task memory allocator via CoTaskMemAlloc. It is part of the Component Object Model (COM) memory management model and is designed to support memory handoffs across component and process boundaries.
The function has the prototype void CoTaskMemFree(void* pv); it does not return a value. If the provided
Usage typically arises when a COM API or a system function returns memory allocated with CoTaskMemAlloc. The
Related functions include CoTaskMemAlloc (to allocate memory), CoTaskMemSize (to query the size of memory allocated with