Partager via


CHeapPtr::CHeapPtr

The constructor.

CHeapPtr( ) throw( ); 
explicit CHeapPtr(
   T* p 
) throw( );
CHeapPtr(
   CHeapPtr< T, Allocator >& p 
) throw( );

Parameters

  • p
    An existing heap pointer or CHeapPtr.

Remarks

The heap pointer can optionally be created using an existing pointer, or a CHeapPtr object. If so, the new CHeapPtr object assumes responsibility for managing the new pointer and resources.

Example

// Create a new CHeapPtr object
CHeapPtr <int> myHP;
// Create a new CHeapPtr from the first
CHeapPtr <int> myHP2(myHP);   

Requirements

Header: atlalloc.h

See Also

Reference

CHeapPtr Class

Other Resources

CHeapPtr Members