DeleteThisAutoPtr< Type > Class Template Reference
 
 
 
DeleteThisAutoPtr< Type > Class Template Reference

This reference page is linked to from the following overview topics: Smart Pointers (AutoPtr).


#include <autoptr.h>

Inheritance diagram for DeleteThisAutoPtr< Type >:
AutoPtr< Type, DeleteThisDestructor >

Class Description

template<typename Type>
class MaxSDK::DeleteThisAutoPtr< Type >

Partial template specialization of AutoPtr for types requiring destruction through a DeleteThis method.

Please refer to AutoPtr's documentation for more information about AutoPtrs.

Public Member Functions

  DeleteThisAutoPtr (Type *p=NULL)
  Construct, assuming ownership of the pointed-to object.
  DeleteThisAutoPtr (const AutoPtrRef< Type > &ref)
  Construct from an AutoPtrRef.

Constructor & Destructor Documentation

DeleteThisAutoPtr ( Type *  p = NULL ) [inline, explicit]

Construct, assuming ownership of the pointed-to object.

Parameters:
p Plain pointer to an object - this AutoPtr will assume ownership of that object.
                                                   : 
                AutoPtr<Type, DeleteThisDestructor >(p)
        { };
DeleteThisAutoPtr ( const AutoPtrRef< Type > &  ref ) [inline]

Construct from an AutoPtrRef.

This may be done implicitly or explicitly. The Ref object exists to avoid temporarily needing to have two AutoPtrs own the same object.

Parameters:
ref helper object.
                                                       :
                AutoPtr<Type, DeleteThisDestructor >(ref.mPtr)
        { }