class SG_EXPORT osg::Referenced

Base class from providing referencing counted objects

Inheritance:


Public Methods

[more] Referenced()
[more] Referenced(const Referenced&)
[more]inline Referenced& operator = (const Referenced&)
[more]static void setDeleteHandler(DeleteHandler* handler)
Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to
[more]static DeleteHandler* getDeleteHandler()
Get a DeleteHandler
[more]inline void ref() const
increment the reference count by one, indicating that this object has another pointer which is referencing it
[more]inline void unref_nodelete() const
decrement the reference count by one, indicating that a pointer to this object is referencing it.
[more]inline int referenceCount() const
return the number pointers currently referencing this object.
[more]inline void unref() const
decrement the reference count by one, indicating that a pointer to this object is referencing it.

Protected Fields

[more]mutable OpenThreads::Mutex _refMutex
[more]mutable int _refCount

Protected Methods

[more]virtual ~Referenced()


Documentation

Base class from providing referencing counted objects
o Referenced()

o Referenced(const Referenced&)

oinline Referenced& operator = (const Referenced&)

ostatic void setDeleteHandler(DeleteHandler* handler)
Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to

ostatic DeleteHandler* getDeleteHandler()
Get a DeleteHandler

oinline void ref() const
increment the reference count by one, indicating that this object has another pointer which is referencing it

oinline void unref_nodelete() const
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.

oinline int referenceCount() const
return the number pointers currently referencing this object.

ovirtual ~Referenced()

omutable OpenThreads::Mutex _refMutex

omutable int _refCount

oinline void unref() const
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.


Direct child classes:
Test
Extensions
SubloadCallback
SubloadCallback
Extensions
SubloadCallback
Extensions
SubloadCallback
SubloadCallback
TextureObjectManager
TextureObject
Extensions
State
Object
DatabaseRequestHandler
NodeVisitor
Extensions
LineSegment
ImpostorSpriteManager
FrameStamp
Extensions
Extensions
DisplaySettings
CullingSet
Extensions
Friends:
class DeleteHandler

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.