Closed GoogleCodeExporter closed 9 years ago
GenericDocument::ParseStream uses the default allocator instead of what might have been specified when the document was constructed. Possible fix: --- rapidjson-0.11/include/rapidjson/document.h 2013-02-11 09:53:43.000000000 -0700 +++ rapidjson/document.h 2013-04-11 15:30:34.000000000 -0600 @@ -708,7 +708,7 @@ template <unsigned parseFlags, typename Stream> GenericDocument& ParseStream(Stream& stream) { ValueType::SetNull(); // Remove existing root if exist - GenericReader<Encoding, Allocator> reader; + GenericReader<Encoding, Allocator> reader(&GetAllocator()); if (reader.template Parse<parseFlags>(stream, *this)) { RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object this->RawAssign(*stack_.template Pop<ValueType>(1)); // Add this-> to prevent issue 13.
Original issue reported on code.google.com by j...@aliso-pacific.com on 6 May 2013 at 4:05
j...@aliso-pacific.com
Original comment by milo...@gmail.com on 18 Jun 2013 at 1:52
milo...@gmail.com
https://github.com/miloyip/rapidjson/pull/12
Original comment by milo...@gmail.com on 25 Jun 2014 at 4:14
Original issue reported on code.google.com by
j...@aliso-pacific.com
on 6 May 2013 at 4:05