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

Do not clear aggregated contents of TextBuffer when releaseBuffers() called #606

Closed
cowtowncoder opened this issue Mar 8, 2020 · 0 comments

Comments

@cowtowncoder
Copy link
Member

(background issue: FasterXML/jackson-databind#2635)

When a JsonParser is closed, buffers associated with it are deallocated, since some of them are recycled. This works fine when caller controls closing directly, but there are cases where this occurs automatically -- for example, when Jackson databind ObjectMapper manages process, when it has implicitly created parser. In such cases, there one specific workflow path where some of the contents of most recently decoded token are needed, see:

FasterXML/jackson-databind#2635

Because of this, upon close, it would make sense NOT to clear _resultString.
(in theory, we might want full contents, but that could have issues with prevent recycling of buffers and so on -- for immediate problem, we know that _resultString has been aggregated and nothing more is needed).

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

No branches or pull requests

1 participant