[Orxonox-commit 5312] r9975 - code/trunk/src/libraries/core/object
landauf at orxonox.net
landauf at orxonox.net
Sat Jan 4 17:29:18 CET 2014
Author: landauf
Date: 2014-01-04 17:29:18 +0100 (Sat, 04 Jan 2014)
New Revision: 9975
Modified:
code/trunk/src/libraries/core/object/ObjectListBase.cc
Log:
details
Modified: code/trunk/src/libraries/core/object/ObjectListBase.cc
===================================================================
--- code/trunk/src/libraries/core/object/ObjectListBase.cc 2014-01-04 14:51:36 UTC (rev 9974)
+++ code/trunk/src/libraries/core/object/ObjectListBase.cc 2014-01-04 16:29:18 UTC (rev 9975)
@@ -63,7 +63,7 @@
}
/**
- @brief Destructor: Deletes all list-elements, but NOT THE OBJECTS.
+ @brief Destructor: Detaches all list-elements, but doesn't delete them (nor the objects).
*/
ObjectListBase::~ObjectListBase()
{
@@ -78,6 +78,10 @@
current = next;
}
+
+ if (!this->listeners_.empty())
+ orxout(internal_error) << "Deleting ObjectListBase but it still has " << this->listeners_.size() << " listeners. This will lead to a crash. "
+ << "Ensure that all Iterators are destroyed before deleting object lists." << endl;
}
/**
More information about the Orxonox-commit
mailing list