Added selective support for thread safe ref/unref such that the rendering

backend now doesn't use thread safe ref counting where multi-buffering exists.
This reduces the overhead of multi-threading.
This commit is contained in:
Robert Osfield
2006-05-02 15:52:46 +00:00
parent 67f56dfd77
commit a8c52a90f0
8 changed files with 29 additions and 11 deletions

View File

@@ -52,6 +52,8 @@ class OSG_EXPORT Object : public Referenced
concrete classes and can be constructed.*/
inline Object():Referenced(),_dataVariance(DYNAMIC) {}
inline explicit Object(bool threadSafeRefUnref):Referenced(threadSafeRefUnref),_dataVariance(DYNAMIC) {}
/** Copy constructor, optional CopyOp object can be used to control
* shallow vs deep copying of dynamic data.*/
Object(const Object&,const CopyOp& copyop=CopyOp::SHALLOW_COPY);