diff options
| author | Richard Linden <none@none> | 2012-12-18 00:58:26 -0800 |
|---|---|---|
| committer | Richard Linden <none@none> | 2012-12-18 00:58:26 -0800 |
| commit | 1f56e57008f5a50c9e75fc0b4512c483ac359a52 (patch) | |
| tree | 6631b12beaf3cf64e093730e9c93df34b883472c /indra/llui/llviewmodel.cpp | |
| parent | 8c2e3bea71ea15b805a9e2a288744f10d195d803 (diff) | |
SH-3468 WIP add memory tracking base class
created memory tracking trace type
instrumented a few classes with memory tracking
Diffstat (limited to 'indra/llui/llviewmodel.cpp')
| -rw-r--r-- | 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 a9f8acc440..dff0dcb2fd 100644 --- a/indra/llui/llviewmodel.cpp +++ b/indra/llui/llviewmodel.cpp @@ -80,7 +80,10 @@ LLTextViewModel::LLTextViewModel(const LLSD& value) void LLTextViewModel::setValue(const LLSD& value) { LLViewModel::setValue(value); + memDisclaim(mDisplay); mDisplay = utf8str_to_wstring(value.asString()); + memClaim(mDisplay); + // mDisplay and mValue agree mUpdateFromDisplay = false; } @@ -91,7 +94,9 @@ 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); mDisplay = value; + memClaim(mDisplay); 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 |
