Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CComHeap Class

This class implements IAtlMemMgr using the COM memory allocation functions.

Important note Important

This class and its members cannot be used in applications that execute in the Windows Runtime.

class CComHeap : public IAtlMemMgr

Name

Description

CComHeap::Allocate

Call this method to allocate a block of memory.

CComHeap::Free

Call this method to free a block of memory allocated by this memory manager.

CComHeap::GetSize

Call this method to get the allocated size of a memory block allocated by this memory manager.

CComHeap::Reallocate

Call this method to reallocate memory allocated by this memory manager.

CComHeap implements memory allocation functions using the COM allocation functions, including CoTaskMemAlloc, CoTaskMemFree, IMalloc::GetSize, and CoTaskMemRealloc. The maximum amount of memory that can be allocated is equal to INT_MAX (2147483647) bytes.

See the example for IAtlMemMgr.

IAtlMemMgr

CComHeap

Header: ATLComMem.h

Show:
© 2015 Microsoft