Share via


CGlobalHeap Class

This class implements IAtlMemMgr using the Win32 global heap functions.

Important

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

class CGlobalHeap : public IAtlMemMgr

Members

Public Methods

Name

Description

CGlobalHeap::Allocate

Call this method to allocate a block of memory.

CGlobalHeap::Free

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

CGlobalHeap::GetSize

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

CGlobalHeap::Reallocate

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

Remarks

CGlobalHeap implements memory allocation functions using the Win32 global heap functions.

Note

The global heap functions are slower than other memory management functions and do not provide as many features. Therefore, new applications should use the heap functions. These are available in the CWin32Heap class. Global functions are still used by DDE and the clipboard functions.

Example

See the example for IAtlMemMgr.

Inheritance Hierarchy

IAtlMemMgr

CGlobalHeap

Requirements

Header: atlmem.h

See Also

Reference

CComHeap Class

CWin32Heap Class

CLocalHeap Class

CCRTHeap Class

IAtlMemMgr Class

Other Resources

ATL Class Overview