diff options
author | simon <none@none> | 2014-02-14 14:57:08 -0800 |
---|---|---|
committer | simon <none@none> | 2014-02-14 14:57:08 -0800 |
commit | 38915f119c5bf3d85084b12939ad815f68fefad0 (patch) | |
tree | c70dbd37bd6242c028485f5a3a69547d2f528c5c /indra/llcommon | |
parent | 6bb9975de1d3122ec83a5391b35a46ec20d66606 (diff) |
More memory cleanup of containers after DeletePairedPointer() usage.
Diffstat (limited to 'indra/llcommon')
-rwxr-xr-x | indra/llcommon/llfasttimer.cpp | 1 | ||||
-rwxr-xr-x | indra/llcommon/llstl.h | 1 |
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 { |