Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CHeapPtr Class

A smart pointer class for managing heap pointers.

template< 
   typename T, 
   class Allocator = CCRTAllocator 
> class CHeapPtr : 
   public CHeapPtrBase< T, Allocator >

T

The object type to be stored on the heap.

Allocator

The memory allocation class to use.

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.

Header: atlcore.h

Community Additions

ADD
Show:
© 2015 Microsoft