From d7b902d57503dddca59c3d7a772e4f6a454afa7b Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Fri, 14 Feb 2014 13:56:36 -0800 Subject: [MAINT-3555] Crash in LLPanel::~LLPanel() on shutdown - Added clear() after DeletePointer() call to hopfully fix this... --- indra/llui/llkeywords.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui/llkeywords.cpp') diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 26d27d1f34..ddf33cf6e0 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -77,7 +77,9 @@ LLKeywords::~LLKeywords() { std::for_each(mWordTokenMap.begin(), mWordTokenMap.end(), DeletePairedPointer()); std::for_each(mLineTokenList.begin(), mLineTokenList.end(), DeletePointer()); + mLineTokenList.clear(); std::for_each(mDelimiterTokenList.begin(), mDelimiterTokenList.end(), DeletePointer()); + mDelimiterTokenList.clear(); } BOOL LLKeywords::loadFromFile( const std::string& filename ) -- cgit v1.2.3 From 38915f119c5bf3d85084b12939ad815f68fefad0 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 14 Feb 2014 14:57:08 -0800 Subject: More memory cleanup of containers after DeletePairedPointer() usage. --- indra/llui/llkeywords.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llkeywords.cpp') diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index ddf33cf6e0..39153977bf 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -76,6 +76,7 @@ inline BOOL LLKeywordToken::isTail(const llwchar* s) const LLKeywords::~LLKeywords() { std::for_each(mWordTokenMap.begin(), mWordTokenMap.end(), DeletePairedPointer()); + mWordTokenMap.clear(); std::for_each(mLineTokenList.begin(), mLineTokenList.end(), DeletePointer()); mLineTokenList.clear(); std::for_each(mDelimiterTokenList.begin(), mDelimiterTokenList.end(), DeletePointer()); -- cgit v1.2.3