[Orxonox-commit 1075] r5796 - in code/branches/core5/src/libraries/core: . input

landauf at orxonox.net landauf at orxonox.net
Sat Sep 26 22:15:53 CEST 2009


Author: landauf
Date: 2009-09-26 22:15:53 +0200 (Sat, 26 Sep 2009)
New Revision: 5796

Modified:
   code/branches/core5/src/libraries/core/Identifier.cc
   code/branches/core5/src/libraries/core/Loader.cc
   code/branches/core5/src/libraries/core/Shell.cc
   code/branches/core5/src/libraries/core/input/InputManager.cc
Log:
replaced delete with destroy() in core

Modified: code/branches/core5/src/libraries/core/Identifier.cc
===================================================================
--- code/branches/core5/src/libraries/core/Identifier.cc	2009-09-26 19:24:56 UTC (rev 5795)
+++ code/branches/core5/src/libraries/core/Identifier.cc	2009-09-26 20:15:53 UTC (rev 5796)
@@ -202,7 +202,7 @@
             if (it->second->hasFactory())
             {
                 BaseObject* temp = it->second->fabricate(0);
-                delete temp;
+                temp->destroy();
             }
         }
         Identifier::stopCreatingHierarchy();

Modified: code/branches/core5/src/libraries/core/Loader.cc
===================================================================
--- code/branches/core5/src/libraries/core/Loader.cc	2009-09-26 19:24:56 UTC (rev 5795)
+++ code/branches/core5/src/libraries/core/Loader.cc	2009-09-26 20:15:53 UTC (rev 5796)
@@ -102,7 +102,7 @@
         for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); )
         {
             if (mask.isIncluded(it->getIdentifier()))
-                delete (*(it++));
+                (it++)->destroy();
             else
                 ++it;
         }
@@ -203,7 +203,7 @@
         for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it; )
         {
             if ((it->getFile() == file) && mask.isIncluded(it->getIdentifier()))
-                delete (*(it++));
+                (it++)->destroy();
             else
                 ++it;
         }

Modified: code/branches/core5/src/libraries/core/Shell.cc
===================================================================
--- code/branches/core5/src/libraries/core/Shell.cc	2009-09-26 19:24:56 UTC (rev 5795)
+++ code/branches/core5/src/libraries/core/Shell.cc	2009-09-26 20:15:53 UTC (rev 5796)
@@ -87,7 +87,7 @@
     {
         OutputHandler::getOutStream().setOutputBuffer(0);
         if (this->inputBuffer_)
-            delete this->inputBuffer_;
+            this->inputBuffer_->destroy();
     }
 
     void Shell::setConfigValues()

Modified: code/branches/core5/src/libraries/core/input/InputManager.cc
===================================================================
--- code/branches/core5/src/libraries/core/input/InputManager.cc	2009-09-26 19:24:56 UTC (rev 5795)
+++ code/branches/core5/src/libraries/core/input/InputManager.cc	2009-09-26 20:15:53 UTC (rev 5796)
@@ -288,10 +288,10 @@
         CCOUT(3) << "Destroying..." << std::endl;
 
         // Destroy calibrator helper handler and state
-        delete keyDetector_;
+        keyDetector_->destroy();
         this->destroyState("calibrator");
         // Destroy KeyDetector and state
-        delete calibratorCallbackHandler_;
+        calibratorCallbackHandler_->destroy();
         this->destroyState("detector");
         // destroy the empty InputState
         this->destroyStateInternal(this->emptyState_);
@@ -721,6 +721,6 @@
             updateActiveStates();
         }
         statesByName_.erase(state->getName());
-        delete state;
+        state->destroy();
     }
 }




More information about the Orxonox-commit mailing list