xbmc
Public Member Functions | List of all members
NPT_Reference< T > Class Template Reference

Public Member Functions

 NPT_Reference (T *object, bool thread_safe=true)
 
 NPT_Reference (const NPT_Reference< T > &ref)
 
 NPT_Reference (T *object, NPT_Cardinal *counter, NPT_Mutex *mutex, bool thread_safe)
 
NPT_Reference< T > & operator= (const NPT_Reference< T > &ref)
 
NPT_Reference< T > & operator= (T *object)
 
T & operator* () const
 
T * operator-> () const
 
bool operator== (const NPT_Reference< T > &ref) const
 
bool operator!= (const NPT_Reference< T > &ref) const
 
template<typename U >
 operator NPT_Reference< U > ()
 
T * AsPointer () const
 Returns the naked pointer value.
 
NPT_Cardinal GetCounter () const
 Returns the reference counter value.
 
bool IsNull () const
 Returns whether this references a NULL object.
 
void Detach ()
 Detach the reference from the shared object. More...
 

Member Function Documentation

◆ Detach()

template<typename T>
void NPT_Reference< T >::Detach ( )
inline

Detach the reference from the shared object.

The reference count is decremented, but the object is not deleted if the reference count becomes 0. After the method returns, this reference does not point to any shared object.


The documentation for this class was generated from the following file: