|
OSG
3.4.0
|
#include <ref_ptr.h>
Public Types | |
| typedef T | element_type |
Public Member Functions | |
| ref_ptr () | |
| ref_ptr (T *ptr) | |
| ref_ptr (const ref_ptr &rp) | |
| template<class Other > | |
| ref_ptr (const ref_ptr< Other > &rp) | |
| ref_ptr (observer_ptr< T > &optr) | |
| ~ref_ptr () | |
| ref_ptr & | operator= (const ref_ptr &rp) |
| template<class Other > | |
| ref_ptr & | operator= (const ref_ptr< Other > &rp) |
| ref_ptr & | operator= (T *ptr) |
| bool | operator== (const ref_ptr &rp) const |
| bool | operator== (const T *ptr) const |
| bool | operator!= (const ref_ptr &rp) const |
| bool | operator!= (const T *ptr) const |
| bool | operator< (const ref_ptr &rp) const |
| operator unspecified_bool_type () const | |
| T & | operator* () const |
| T * | operator-> () const |
| T * | get () const |
| bool | operator! () const |
| bool | valid () const |
| T * | release () |
| void | swap (ref_ptr &rp) |
Friends | |
| template<class Other > | |
| class | ref_ptr |
| bool | operator== (const T *ptr, const ref_ptr &rp) |
| bool | operator!= (const T *ptr, const ref_ptr &rp) |
Smart pointer for handling referenced counted objects.
| typedef T osg::ref_ptr< T >::element_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
release the pointer from ownership by this ref_ptr<>, decrementing the objects refencedCount() via unref_nodelete() to prevent the Object object from being deleted even if the reference count goes to zero. Use when using a local ref_ptr<> to an Object that you want to return from a function/method via a C pointer, whilst preventing the normal ref_ptr<> destructor from cleaning up the object. When using release() you are implicitly expecting other code to take over management of the object, otherwise a memory leak will result.
Definition at line 101 of file ref_ptr.h.

|
inline |
|
inline |
|
friend |
1.8.8