Inheritance diagram for osg::Referenced:
Public Member Functions | |
Referenced () | |
Referenced (const Referenced &) | |
Referenced & | operator= (const Referenced &) |
void | setThreadSafeRefUnref (bool threadSafe) |
bool | getThreadSafeRefUnref () const |
void | ref () const |
void | unref () const |
void | unref_nodelete () const |
int | referenceCount () const |
Static Public Member Functions | |
void | setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting) |
bool | getThreadSafeReferenceCounting () |
void | setDeleteHandler (DeleteHandler *handler) |
DeleteHandler * | getDeleteHandler () |
Protected Member Functions | |
virtual | ~Referenced () |
Protected Attributes | |
OpenThreads::Mutex * | _refMutex |
int | _refCount |
Friends | |
class | DeleteHandler |
|
|
|
|
|
|
|
Get a DeleteHandler. |
|
Get whether reference counting is active. |
|
Get whether a mutex is used to ensure ref() and unref() are thread safe. |
|
|
|
Increment the reference count by one, indicating that this object has another pointer which is referencing it. |
|
Return the number pointers currently referencing this object. |
|
Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. |
|
Set whether reference counting should be use a mutex to create thread reference counting. |
|
Set whether to use a mutex to ensure ref() and unref() are thread safe. |
|
Decrement the reference count by one, indicating that a pointer to this object is referencing it. If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted. |
|
Decrement the reference count by one, indicating that a pointer to this object is referencing it. However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be resonsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks. |
|
|
|
|
|
|