| description | Learn more about: CComHeapPtr Class | |||
|---|---|---|---|---|
| title | CComHeapPtr Class | |||
| ms.date | 11/04/2016 | |||
| f1_keywords |
|
|||
| helpviewer_keywords |
|
|||
| ms.assetid | bd08b53d-da2b-43ab-a79c-e7c8dbbc5994 |
A smart pointer class for managing heap pointers.
template<typename T>
class CComHeapPtr : public CHeapPtr<T, CComAllocator>
T
The object type to be stored on the heap.
| Name | Description |
|---|---|
| CComHeapPtr::CComHeapPtr | The constructor. |
CComHeapPtr derives from CHeapPtr, but uses CComAllocator to allocate memory using COM routines. See CHeapPtr and CHeapPtrBase for the methods available.
CComHeapPtr
Header: atlbase.h
The constructor.
CComHeapPtr() throw();
explicit CComHeapPtr(T* pData) throw();
pData
An existing CComHeapPtr object.
The heap pointer can optionally be created using an existing CComHeapPtr object. If so, the new CComHeapPtr object assumes responsibility for managing the new pointer and resources.
CHeapPtr Class
CHeapPtrBase Class
CComAllocator Class
Class Overview