CHeapPtr Class
TOC
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

CHeapPtr Class

A smart pointer class for managing heap pointers.

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.

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.

Requirements

Header: atlcore.h

Example

See the ISAPIFilter Sample.

See Also

Class Members | CHeapPtrBase | CCRTAllocator | ATL Class Overview

Show:
© 2016 Microsoft