Поделиться через


CAutoPtr::CAutoPtr

The constructor.

CAutoPtr( ) throw( ); 
explicit CAutoPtr(
   T* p 
) throw( );
template< typename TSrc > CAutoPtr(
   CAutoPtr< TSrc >& p 
) throw( );
template< > CAutoPtr(
   CAutoPtr< T >& p 
) throw( );

Параметры

  • p
    An existing pointer.

  • TSrc
    The type being managed by another CAutoPtr, used to initialize the current object.

Заметки

The CAutoPtr object can be created using an existing pointer, in which case it transfers ownership of the pointer.

Пример

See the example in the CAutoPtr Overview.

Требования

Header: atlbase.h

См. также

Основные понятия

CAutoPtr Class

CAutoPtr Members

CAutoPtr::~CAutoPtr