CHeapPtr Class
A smart pointer class for managing heap pointers.
Important
This class and its members cannot be used in applications that execute in the Windows Runtime.
template<
typename T,
class Allocator= CCRTAllocator
> class CHeapPtr :
public CHeapPtrBase< T, Allocator>
Parameters
T
The object type to be stored on the heap.Allocator
The memory allocation class to use.
Members
Public Constructors
Name |
Description |
---|---|
The constructor. |
Public Methods
Name |
Description |
---|---|
Call this method to allocate memory on the heap to store objects. |
|
Call this method to reallocate the memory on the heap. |
Public Operators
Name |
Description |
---|---|
The assignment operator. |
Remarks
CHeapPtr is derived from CHeapPtrBase and by default uses the CRT routines (in CCRTAllocator) to allocate and free memory. The class CHeapPtrList may be used to construct a list of heap pointers. See also CComHeapPtr, which uses COM memory allocation routines.
Inheritance Hierarchy
CHeapPtr
Requirements
Header: atlcore.h