|
| Auto_ptr (T *p=0) throw () |
| Construction by assignment of a normal pointer. More...
|
|
| Auto_ptr (Auto_ptr const &o) throw () |
| Copy construction, releases the original pointer. More...
|
|
Auto_ptr & | operator= (Auto_ptr const &o) throw () |
| Assignment from another smart pointer. More...
|
|
| ~Auto_ptr () throw () |
| Destruction, shall delete the object.
|
|
T & | operator* () const throw () |
| Dereference the pointer.
|
|
T * | operator-> () const throw () |
| Member access for the object.
|
|
T * | get () const throw () |
| Get the normal pointer. More...
|
|
T * | release () throw () |
| Release the object and get the normal pointer back. More...
|
|
void | reset (T *p=0) throw () |
| Delete the object and reset the smart pointer to NULL.
|
|
| operator Priv_type * () const throw () |
| Operator for if (!ptr) ... .
|
|
template<typename T>
class cxx::Auto_ptr< T >
Smart pointer with automatic deletion.
- Template Parameters
-
T | The type of the referenced object. |
This smart pointer calls the delete operator when the destructor is called. This has the effect that the object the pointer points to will be deleted when the pointer goes out of scope, or a new value gets assigned. The smart pointer provides a release() method to get a normal pointer to the object and set the smart pointer to NULL.
Definition at line 36 of file auto_ptr.