From ab8f64a96754edaa68dd1ff97b9519eff4496aa6 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 24 Sep 2013 00:05:43 -0700 Subject: converted memory tracking units to KB from B added more memory tracking to LLFolderView and kin --- indra/llui/llviewmodel.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llui/llviewmodel.cpp') diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp index 1b0ab6d92c..21c4e0fcac 100755 --- a/indra/llui/llviewmodel.cpp +++ b/indra/llui/llviewmodel.cpp @@ -82,9 +82,12 @@ LLTextViewModel::LLTextViewModel(const LLSD& value) void LLTextViewModel::setValue(const LLSD& value) { LLViewModel::setValue(value); + // approximate LLSD storage usage + memDisclaim(mDisplay.size()); memDisclaim(mDisplay); mDisplay = utf8str_to_wstring(value.asString()); memClaim(mDisplay); + memClaim(mDisplay.size()); // mDisplay and mValue agree mUpdateFromDisplay = false; @@ -96,9 +99,11 @@ void LLTextViewModel::setDisplay(const LLWString& value) // and do the utf8str_to_wstring() to get the corresponding mDisplay // value. But a text editor might want to edit the display string // directly, then convert back to UTF8 on commit. + memDisclaim(mDisplay.size()); memDisclaim(mDisplay); mDisplay = value; memClaim(mDisplay); + memClaim(mDisplay.size()); mDirty = true; // Don't immediately convert to UTF8 -- do it lazily -- we expect many // more setDisplay() calls than getValue() calls. Just flag that it needs -- cgit v1.2.3