diff options
author | Richard Linden <none@none> | 2013-09-24 00:05:43 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-09-24 00:05:43 -0700 |
commit | ab8f64a96754edaa68dd1ff97b9519eff4496aa6 (patch) | |
tree | 79261fb8093affd8d7cb94f492b19ad9eec6e0e2 /indra/llui/llviewmodel.cpp | |
parent | 0a87ffb876f3beec6bc7d192c3aba6edf9ded828 (diff) |
converted memory tracking units to KB from B
added more memory tracking to LLFolderView and kin
Diffstat (limited to 'indra/llui/llviewmodel.cpp')
-rwxr-xr-x | indra/llui/llviewmodel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 |