Added a DeleteHandler into osg::Referenced so that it can delete objects

via a seperate delete handler.  Useful for making unref()/ref() thread safe if
the users needs to address this issue.
This commit is contained in:
Robert Osfield
2002-12-16 10:25:31 +00:00
parent cb87e7b3bc
commit 884b2730e8
5 changed files with 96 additions and 22 deletions

View File

@@ -16,7 +16,7 @@ namespace osg {
* the standard pure virtual clone, isSameKindAs and className methods
* which are required for all Object subclasses.*/
#define META_Object(library,name) \
virtual osg::Object* cloneType() const { return osgNew name (); } \
virtual osg::Object* cloneType() const { return new name (); } \
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return osgNew name (*this,copyop); } \
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const name *>(obj)!=NULL; } \
virtual const char* libraryName() const { return #library; }\