Deinitialize scenegraph nodes when scenegraph is deinitialized

This commit is contained in:
Alexander Bock
2014-11-25 19:15:33 +01:00
parent 561aa221d3
commit fdca1c0b3b
+4 -1
View File
@@ -303,7 +303,10 @@ void SceneGraph::scheduleLoadSceneFile(const std::string& sceneDescriptionFilePa
}
void SceneGraph::clearSceneGraph() {
// deallocate the scene graph. Recursive deallocation will occur
for (auto node : _nodes)
node->deinitialize();
// deallocate the scene graph. Recursive deallocation will occur
delete _root;
_root = nullptr;