]> git.mxchange.org Git - simgear.git/commitdiff
Reset: DeletionManager can be uninstalled
authorJames Turner <zakalawe@mac.com>
Mon, 11 Nov 2013 07:02:24 +0000 (23:02 -0800)
committerJames Turner <zakalawe@mac.com>
Tue, 12 Nov 2013 22:23:14 +0000 (22:23 +0000)
simgear/scene/util/DeletionManager.cxx
simgear/scene/util/DeletionManager.hxx

index dbc24dad95e6bb2137541f82f938bb411fa2d105..34a4eee0b2ebcaca92ba2c3052fe02c083d5c515 100644 (file)
@@ -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());
index 82d7410dcfeecb53b82aca29112fb64fb3d5a027..47fb7d24b0e36935681a6d9ffdee73bd1a9459fd 100644 (file)
@@ -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;