[Orxonox-commit 3309] r7998 - code/branches/usability/src/orxonox

rgrieder at orxonox.net rgrieder at orxonox.net
Mon Feb 28 04:58:31 CET 2011


Author: rgrieder
Date: 2011-02-28 04:58:31 +0100 (Mon, 28 Feb 2011)
New Revision: 7998

Modified:
   code/branches/usability/src/orxonox/LevelManager.cc
Log:
Clean up LevelInfoItem at the end of the program.

Modified: code/branches/usability/src/orxonox/LevelManager.cc
===================================================================
--- code/branches/usability/src/orxonox/LevelManager.cc	2011-02-28 03:54:09 UTC (rev 7997)
+++ code/branches/usability/src/orxonox/LevelManager.cc	2011-02-28 03:58:31 UTC (rev 7998)
@@ -74,6 +74,10 @@
 
     LevelManager::~LevelManager()
     {
+        // Delete all the LevelInfoItem objects because the LevelManager created them
+        std::set<LevelInfoItem*, LevelInfoCompare>::iterator it = availableLevels_.begin();
+        for (; it != availableLevels_.end(); ++it)
+            delete *it;
     }
 
     /**




More information about the Orxonox-commit mailing list