Closed GoogleCodeExporter closed 8 years ago
It is because the values are allocated by document's allocator in the code. You
can use a allocator (e.g. a document) that stays alive with the value. Or just
use a document instead of value in the function parameter.
Original comment by milo...@gmail.com
on 5 Feb 2013 at 4:52
Yes. This is evident from what happens. But it unfortunately does prevent one
from detaching a value from document to simplify code? How would you fix this
code to work properly?
Original comment by cmous...@gmail.com
on 5 Feb 2013 at 7:30
You may clone the value to a document, which can be done by using Accept().
Otherwise, as I mentioned, you can use another allocator when creating the
values. Using CrtAllocator will not destroy the memory buffer as the default
MemoryPoolAllocator.
Original comment by milo...@gmail.com
on 5 Feb 2013 at 10:59
Original issue reported on code.google.com by
cmous...@gmail.com
on 4 Feb 2013 at 5:20Attachments: