summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/test/llsd_new_tut.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/indra/test/llsd_new_tut.cpp b/indra/test/llsd_new_tut.cpp
index dd93b36f04..f332ad0ee2 100644
--- a/indra/test/llsd_new_tut.cpp
+++ b/indra/test/llsd_new_tut.cpp
@@ -742,6 +742,42 @@ namespace tut
LLSD w = v;
w = "nice day";
}
+
+ {
+ SDAllocationCheck check("shared values test for threaded work", 9);
+
+ //U32 start_llsd_count = LLSD::outstandingCount();
+
+ LLSD m = LLSD::emptyMap();
+
+ m["one"] = 1;
+ m["two"] = 2;
+ m["one_copy"] = m["one"]; // 3 (m, "one" and "two")
+
+ m["undef_one"] = LLSD();
+ m["undef_two"] = LLSD();
+ m["undef_one_copy"] = m["undef_one"];
+
+ { // Ensure first_array gets freed to avoid counting it
+ LLSD first_array = LLSD::emptyArray();
+ first_array.append(1.0f);
+ first_array.append(2.0f);
+ first_array.append(3.0f); // 7
+
+ m["array"] = first_array;
+ m["array_clone"] = first_array;
+ m["array_copy"] = m["array"]; // 7
+ }
+
+ m["string_one"] = "string one value";
+ m["string_two"] = "string two value";
+ m["string_one_copy"] = m["string_one"]; // 9
+
+ //U32 llsd_object_count = LLSD::outstandingCount();
+ //std::cout << "Using " << (llsd_object_count - start_llsd_count) << " LLSD objects" << std::endl;
+
+ //m.dumpStats();
+ }
}
template<> template<>