DeleteThisAutoPtr< Type > Class Template Reference

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



Detailed 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.

#include <autoptr.h>

Inheritance diagram for DeleteThisAutoPtr< Type >:
Inheritance graph
[legend]

List of all members.

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)
    { }