From 3dd2641818f9be3a6a38c8223658814644b06ce8 Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Fri, 8 Oct 2010 01:35:14 +0200 Subject: VWR-23239 FIXED memory leak in LLUIString --- indra/llui/lluistring.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h index 3f91856e26..1ecd9bab36 100644 --- a/indra/llui/lluistring.h +++ b/indra/llui/lluistring.h @@ -68,6 +68,8 @@ public: LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args); LLUIString(const std::string& instring) : mArgs(NULL) { assign(instring); } + ~LLUIString() { delete mArgs; } + void assign(const std::string& instring); LLUIString& operator=(const std::string& s) { assign(s); return *this; } -- cgit v1.2.3 From ea2005edf062b69e88261e2a824bdbb6e2b2db7d Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Fri, 8 Oct 2010 00:53:55 +0200 Subject: fixed indentation in lluistring.h --- indra/llui/lluistring.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h index 1ecd9bab36..6a3a9dba46 100644 --- a/indra/llui/lluistring.h +++ b/indra/llui/lluistring.h @@ -64,7 +64,7 @@ class LLUIString public: // These methods all perform appropriate argument substitution // and modify mOrig where appropriate - LLUIString() : mArgs(NULL), mNeedsResult(false), mNeedsWResult(false) {} + LLUIString() : mArgs(NULL), mNeedsResult(false), mNeedsWResult(false) {} LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args); LLUIString(const std::string& instring) : mArgs(NULL) { assign(instring); } @@ -89,14 +89,14 @@ public: void clear(); void clearArgs() { if (mArgs) mArgs->clear(); } - + // These utility functions are included for text editing. // They do not affect mOrig and do not perform argument substitution void truncate(S32 maxchars); void erase(S32 charidx, S32 len); void insert(S32 charidx, const LLWString& wchars); void replace(S32 charidx, llwchar wc); - + private: // something changed, requiring reformatting of strings void dirty(); @@ -108,7 +108,7 @@ private: void updateResult() const; void updateWResult() const; LLStringUtil::format_map_t& getArgs(); - + std::string mOrig; mutable std::string mResult; mutable LLWString mWResult; // for displaying -- cgit v1.2.3