Quoting Robert Osfield <[EMAIL PROTECTED]>: > The key to understanding is looking a the signature of the methods - > one is static method and one is a normal member. The static method, > static void setThreadSafeReferenceCounting(bool), sets the default > value, the non static, virtual void setThreadSafeRefUnref(bool > threadSafe), assigns the setting of a particular object.
What might confuse people is that calling: osg::Referenced* r = new osg::Referenced; r->setThreadSafeReferenceCounting(true); // static version r->setThreadSafeRefUnref(true); // instance version do two separate things. The first only sets the default but doesn't enable it for the object (which it can't do because it's a static function, just called in an unorthodox way). The second actually enables thread-safety for the object. Maybe by renaming the static 'setThreadSafeReferenceCounting' to something like 'setGlobalThreadSafeRefUnref' it becomes a little bit clearer? /Ulrich _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

