diff options
Diffstat (limited to 'indra/llcommon')
-rwxr-xr-x | indra/llcommon/llerror.cpp | 4 | ||||
-rwxr-xr-x | indra/llcommon/llfasttimer.cpp | 1 | ||||
-rwxr-xr-x | indra/llcommon/llstl.h | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index d2af004cde..853f279c95 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -429,8 +429,8 @@ namespace LLError ~Settings() { - for_each(recorders.begin(), recorders.end(), - DeletePointer()); + for_each(recorders.begin(), recorders.end(), DeletePointer()); + recorders.clear(); } static Settings*& getPtr(); 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 { |