From fad333256c6fd59e1a2710d8d417878c592d1199 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 10 Nov 2013 23:02:24 -0800 Subject: [PATCH] Reset: DeletionManager can be uninstalled --- simgear/scene/util/DeletionManager.cxx | 5 +++++ simgear/scene/util/DeletionManager.hxx | 1 + 2 files changed, 6 insertions(+) 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; -- 2.39.5