[Orxonox-commit 1078] r5799 - code/branches/core5/src/modules/gamestates

landauf at orxonox.net landauf at orxonox.net
Sat Sep 26 22:19:14 CEST 2009


Author: landauf
Date: 2009-09-26 22:19:14 +0200 (Sat, 26 Sep 2009)
New Revision: 5799

Modified:
   code/branches/core5/src/modules/gamestates/GSGraphics.cc
   code/branches/core5/src/modules/gamestates/GSLevel.cc
   code/branches/core5/src/modules/gamestates/GSMainMenu.cc
   code/branches/core5/src/modules/gamestates/GSRoot.cc
Log:
replaced delete with destroy() in gamestates

Modified: code/branches/core5/src/modules/gamestates/GSGraphics.cc
===================================================================
--- code/branches/core5/src/modules/gamestates/GSGraphics.cc	2009-09-26 20:18:24 UTC (rev 5798)
+++ code/branches/core5/src/modules/gamestates/GSGraphics.cc	2009-09-26 20:19:14 UTC (rev 5799)
@@ -73,7 +73,7 @@
     GSGraphics::~GSGraphics()
     {
         InputManager::getInstance().destroyState("master");
-        delete this->masterKeyBinder_;
+        this->masterKeyBinder_->destroy();
     }
 
     /**
@@ -133,12 +133,12 @@
         }
 */
 
-        delete this->console_;
+        this->console_->destroy();
 
         Loader::unload(this->debugOverlay_);
         delete this->debugOverlay_;
 
-        delete this->soundManager_;
+        this->soundManager_->destroy();
 
         // HACK: (destroys a resource smart pointer)
         Map::hackDestroyMap();

Modified: code/branches/core5/src/modules/gamestates/GSLevel.cc
===================================================================
--- code/branches/core5/src/modules/gamestates/GSLevel.cc	2009-09-26 20:18:24 UTC (rev 5798)
+++ code/branches/core5/src/modules/gamestates/GSLevel.cc	2009-09-26 20:19:14 UTC (rev 5799)
@@ -187,7 +187,7 @@
 
         if (this->radar_)
         {
-            delete this->radar_;
+            this->radar_->destroy();
             this->radar_ = 0;
         }
 
@@ -199,7 +199,7 @@
 
         if (this->playerManager_)
         {
-            delete this->playerManager_;
+            this->playerManager_->destroy();
             this->playerManager_ = 0;
         }
 
@@ -217,7 +217,7 @@
             InputManager::getInstance().destroyState("game");
             if (this->keyBinder_)
             {
-                delete this->keyBinder_;
+                this->keyBinder_->destroy();
                 this->keyBinder_ = 0;
             }
         }

Modified: code/branches/core5/src/modules/gamestates/GSMainMenu.cc
===================================================================
--- code/branches/core5/src/modules/gamestates/GSMainMenu.cc	2009-09-26 20:18:24 UTC (rev 5798)
+++ code/branches/core5/src/modules/gamestates/GSMainMenu.cc	2009-09-26 20:19:14 UTC (rev 5799)
@@ -64,7 +64,7 @@
         InputManager::getInstance().destroyState("mainMenu");
 
         this->scene_->getSceneManager()->destroyCamera(this->camera_);
-        delete this->scene_;
+        this->scene_->destroy();
     }
 
     void GSMainMenu::activate()
@@ -107,7 +107,7 @@
 
     void GSMainMenu::deactivate()
     {
-        delete this->ambient_;
+        this->ambient_->destroy();
 
         InputManager::getInstance().leaveState("mainMenu");
 

Modified: code/branches/core5/src/modules/gamestates/GSRoot.cc
===================================================================
--- code/branches/core5/src/modules/gamestates/GSRoot.cc	2009-09-26 20:18:24 UTC (rev 5798)
+++ code/branches/core5/src/modules/gamestates/GSRoot.cc	2009-09-26 20:19:14 UTC (rev 5799)
@@ -98,7 +98,7 @@
         }
 */
 
-        delete this->levelManager_;
+        this->levelManager_->destroy();
     }
 
     void GSRoot::update(const Clock& time)




More information about the Orxonox-commit mailing list