-
Notifications
You must be signed in to change notification settings - Fork 21
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
VectorBuilder/Vector has a memory leak #10922
Comments
Arguably a
In the case of There is one clear (ha!) bug though:
|
@retronym I am not concerned with the builder retaining a reference to an unbuild result - that is part of the behaviour of a builder, its that a pre-build result retains a reference to later added value
|
You are relying on undefined behavior. A
|
@szeiger Your response regarding VectorBuilder on structural sharing is however contradictory. How can you achieve any structural sharing if you are required to call clear after build. Specifically you could not even call build twice in succession, for the trivial case, and you cant add to a built data, so what is ever possibly sharable? |
The documentation in As you observed, some already do. In particular,
I was referring to the non-standard use without |
vector builder shared the underlying array with the built vector
so if I add to the builder after a vector is built, that built vector refers to this item so the new item cannot be GCed until the vectorBuilder, and all vectors are GCed
The text was updated successfully, but these errors were encountered: