Open
Description
A pinned bumpalo::boxed::Box
might not uphold Pin
's Drop guarantee. Specifically if a pinned bumpalo::boxed::Box
is forgotten then the memory backing it might still be freed. (This differs from how std::boxed::Box is implemented.)
To soundly give out pinned references from a Bump
one could keep a counter of the number of pinned allocations that still need to be freed and if that counter isn't zero when Bump
is dropped then it could leak all of its memory. However decrementing this counter when a Box
is dropped would require bumpalo::boxed::Box
to store a reference to Bump
which would double the Box
's size (two pointers).
Metadata
Assignees
Labels
No labels