GenericDocument::Accept: deep-copy strings, if needed
Instead of always just shallowly referencing the potentially allocated strings when calling the Handler::String function, request a copy in case the string has been allocated from an Allocator before. This is necessary to avoid double free()s of the string memory, especially when using the Handler to create a deep copy of a Value. The explicit comparison against '0' is done to suppress the warning C4800 on MSVC, see pah/rapidjson#5.
Showing
Please
register
or
sign in
to comment