77 {
if (_p)
delete _p; }
90 T *
get()
const throw() {
return _p; }
98 T *
release() throw() { T *t = _p; _p = 0;
return t; }
110 operator Priv_type * ()
const throw()
111 {
return reinterpret_cast<Priv_type*
>(_p); }
T & operator*() const
Dereference the pointer.
Auto_ptr(T *p=0)
Construction by assignment of a normal pointer.
Auto_ptr(Auto_ptr const &o)
Copy construction, releases the original pointer.
Smart pointer with automatic deletion.
Auto_ptr & operator=(Auto_ptr const &o)
Assignment from another smart pointer.
~Auto_ptr()
Destruction, shall delete the object.
T * operator->() const
Member access for the object.
T * release()
Release the object and get the normal pointer back.
void reset(T *p=0)
Delete the object and reset the smart pointer to NULL.
T Ref_type
The referenced type.