summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorsimon <none@none>2014-02-14 14:57:08 -0800
committersimon <none@none>2014-02-14 14:57:08 -0800
commit38915f119c5bf3d85084b12939ad815f68fefad0 (patch)
treec70dbd37bd6242c028485f5a3a69547d2f528c5c /indra/llcommon
parent6bb9975de1d3122ec83a5391b35a46ec20d66606 (diff)
More memory cleanup of containers after DeletePairedPointer() usage.
Diffstat (limited to 'indra/llcommon')
-rwxr-xr-xindra/llcommon/llfasttimer.cpp1
-rwxr-xr-xindra/llcommon/llstl.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp
index 01b6e60d2b..58db7d0d17 100755
--- a/indra/llcommon/llfasttimer.cpp
+++ b/indra/llcommon/llfasttimer.cpp
@@ -119,6 +119,7 @@ public:
~NamedTimerFactory()
{
std::for_each(mTimers.begin(), mTimers.end(), DeletePairedPointer());
+ mTimers.clear();
delete mTimerRoot;
}
diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h
index d3941e1bc9..0a39288f5a 100755
--- a/indra/llcommon/llstl.h
+++ b/indra/llcommon/llstl.h
@@ -98,6 +98,7 @@ struct DeletePointerArray
// The general form is:
//
// std::for_each(somemap.begin(), somemap.end(), DeletePairedPointer());
+// somemap.clear(); // Don't leave dangling pointers around
struct DeletePairedPointer
{