CHeapPtrBase Class
This class forms the basis for several smart heap pointer classes.
Important
This class and its members cannot be used in applications that execute in the Windows Runtime.
template <
class T,
class Allocator= CCRTAllocator
> class CHeapPtrBase
Parameters
T
The object type to be stored on the heap.Allocator
The memory allocation class to use. By default CRT routines are used to allocate and free memory.
Members
Public Constructors
Name |
Description |
---|---|
The destructor. |
Public Methods
Name |
Description |
---|---|
Call this method to allocate memory. |
|
Call this method to take ownership of an existing pointer. |
|
Call this method to release ownership of a pointer. |
|
Call this method to delete an object pointed to by a CHeapPtrBase. |
|
Call this method to reallocate memory. |
Public Operators
Name |
Description |
---|---|
The cast operator. |
|
The & operator. |
|
The pointer-to-member operator. |
Public Data Members
Name |
Description |
---|---|
The pointer data member variable. |
Remarks
This class forms the basis for several smart heap pointer classes. The derived classes, for example, CHeapPtr and CComHeapPtr, add their own constructors and operators. See these classes for implementation examples.
Requirements
Header: atlcore.h