[Orxonox-commit 6363] r11020 - in code/trunk/src: libraries/core modules/objects/triggers modules/portals orxonox
landauf at orxonox.net
landauf at orxonox.net
Sat Jan 2 21:08:54 CET 2016
Author: landauf
Date: 2016-01-02 21:08:54 +0100 (Sat, 02 Jan 2016)
New Revision: 11020
Modified:
code/trunk/src/libraries/core/CoreIncludes.h
code/trunk/src/modules/objects/triggers/MultiTrigger.cc
code/trunk/src/modules/portals/PortalEndPoint.cc
code/trunk/src/orxonox/LevelManager.cc
Log:
fixed some cases where 'delete' was used instead of destroy()
Modified: code/trunk/src/libraries/core/CoreIncludes.h
===================================================================
--- code/trunk/src/libraries/core/CoreIncludes.h 2016-01-02 20:08:12 UTC (rev 11019)
+++ code/trunk/src/libraries/core/CoreIncludes.h 2016-01-02 20:08:54 UTC (rev 11020)
@@ -228,7 +228,7 @@
: StaticallyInitializedInstance(StaticInitialization::IDENTIFIER)
, identifier_(identifier)
{}
- ~StaticallyInitializedIdentifier() { delete identifier_; }
+ ~StaticallyInitializedIdentifier() { identifier_->destroy(); }
virtual void load()
{
Modified: code/trunk/src/modules/objects/triggers/MultiTrigger.cc
===================================================================
--- code/trunk/src/modules/objects/triggers/MultiTrigger.cc 2016-01-02 20:08:12 UTC (rev 11019)
+++ code/trunk/src/modules/objects/triggers/MultiTrigger.cc 2016-01-02 20:08:54 UTC (rev 11020)
@@ -453,7 +453,7 @@
MultiTriggerContainer* container = new MultiTriggerContainer(this->getContext(), this, originator);
this->fireEvent(status, container);
orxout(verbose, context::triggers) << "MultiTrigger '" << this->getName() << "' (&" << this << "): Fired event. originator: " << originator->getIdentifier()->getName() << " (&" << originator << "), status: " << status << "." << endl;
- delete container;
+ container->destroy();
}
/**
Modified: code/trunk/src/modules/portals/PortalEndPoint.cc
===================================================================
--- code/trunk/src/modules/portals/PortalEndPoint.cc 2016-01-02 20:08:12 UTC (rev 11019)
+++ code/trunk/src/modules/portals/PortalEndPoint.cc 2016-01-02 20:08:54 UTC (rev 11020)
@@ -70,7 +70,7 @@
PortalEndPoint::~PortalEndPoint()
{
if(this->isInitialized() && this->trigger_ != NULL)
- delete this->trigger_;
+ this->trigger_->destroy();
}
void PortalEndPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
Modified: code/trunk/src/orxonox/LevelManager.cc
===================================================================
--- code/trunk/src/orxonox/LevelManager.cc 2016-01-02 20:08:12 UTC (rev 11019)
+++ code/trunk/src/orxonox/LevelManager.cc 2016-01-02 20:08:54 UTC (rev 11020)
@@ -79,7 +79,7 @@
// 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;
+ (*it)->destroy();
}
/**
More information about the Orxonox-commit
mailing list