Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default allocator is used for GenericReader in GenericDocument::ParseStream #27

Closed
GoogleCodeExporter opened this issue Jan 31, 2016 · 4 comments

Comments

@GoogleCodeExporter
Copy link

GenericDocument::ParseStream() does not pass custom memory allocator to 
GenericReader template in document.h:703. Proposed patch

Index: document.h
===================================================================
--- document.h
+++ document.h
@@ -700,7 +700,7 @@
    template <unsigned parseFlags, typename SourceEncoding, typename InputStream>
    GenericDocument& ParseStream(InputStream& is) {
        ValueType::SetNull(); // Remove existing root if exist
-       GenericReader<SourceEncoding, Encoding> reader;
+       GenericReader<SourceEncoding, Encoding, Allocator> reader;
        if (reader.Parse<parseFlags>(is, *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 mte...@googlemail.com on 12 Jun 2012 at 10:06

@GoogleCodeExporter
Copy link
Author

Original comment by milo...@gmail.com on 12 Nov 2012 at 3:59

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision r76.

Original comment by milo...@gmail.com on 14 Nov 2012 at 2:50

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision r77.

Original comment by milo...@gmail.com on 14 Nov 2012 at 2:53

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision 790b7f127cce.

Original comment by milo...@gmail.com on 6 Jun 2014 at 6:04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant