Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0
Description
The StructBuilder stores two copies of the inner ArrayBuilders in two separate Vecs via some unsafe code. To avoid double-dropping the builders, the StructBuilder Drop impl uses mem::forget on one of the vectors. This avoids calling the destructor of the ArrayBuilders twice, but also leaks the memory of the Vec itself.
In addition, the double-vecs with the unsafe code is completely unnecessary since you can just call `ArrayBuilder::as_mut_any` on the `dyn ArrayBuilder` instead of having to covert to a `Box<dyn Any>`.
Attachments
Issue Links
- links to