@@ -280,7 +280,7 @@ A very special decision during design of RapidJSON is that, assignment of value
...
@@ -280,7 +280,7 @@ A very special decision during design of RapidJSON is that, assignment of value
~~~~~~~~~~cpp
~~~~~~~~~~cpp
Value a(123);
Value a(123);
Value b(456);
Value b(456);
b = a; // a becomes a Null value, b becomes number 123.
a = b; // a becomes number 456, b becomes a Null value.
~~~~~~~~~~
~~~~~~~~~~


...
@@ -305,7 +305,7 @@ Value o(kObjectType);
...
@@ -305,7 +305,7 @@ Value o(kObjectType);


The object `o` needs to allocate a buffer of same size as contacts, makes a deep clone of it, and then finally contacts is destructed. This will incur a lot of unnecessary allocations/deallocations and memory copying.
The object `o` needs to allocate a buffer of same size as `contacts`, makes a deep clone of it, and then finally `contacts` is destructed. This will incur a lot of unnecessary allocations/deallocations and memory copying.
There are solutions to prevent actual copying these data, such as reference counting and garbage collection(GC).
There are solutions to prevent actual copying these data, such as reference counting and garbage collection(GC).