From: James Turner Date: Mon, 11 Nov 2013 07:02:24 +0000 (-0800) Subject: Reset: DeletionManager can be uninstalled X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fad333256c6fd59e1a2710d8d417878c592d1199;p=simgear.git Reset: DeletionManager can be uninstalled --- diff --git a/simgear/scene/util/DeletionManager.cxx b/simgear/scene/util/DeletionManager.cxx index dbc24dad..34a4eee0 100644 --- a/simgear/scene/util/DeletionManager.cxx +++ b/simgear/scene/util/DeletionManager.cxx @@ -45,6 +45,11 @@ void DeletionManager::addStaleObject(Referenced* obj) _staleObjects.push_back(obj); } +void DeletionManager::uninstall(Node* node) +{ + node->removeEventCallback(instance()); +} + void DeletionManager::install(Node* node) { node->addEventCallback(instance()); diff --git a/simgear/scene/util/DeletionManager.hxx b/simgear/scene/util/DeletionManager.hxx index 82d7410d..47fb7d24 100644 --- a/simgear/scene/util/DeletionManager.hxx +++ b/simgear/scene/util/DeletionManager.hxx @@ -38,6 +38,7 @@ public: osg::Object* object, osg::NodeVisitor* nv); void addStaleObject(osg::Referenced* obj); static void install(osg::Node* node); + static void uninstall(osg::Node* node); static DeletionManager* instance(); protected: OpenThreads::Mutex _mutex;