alamb commented on pull request #1432: URL: https://github.com/apache/arrow-rs/pull/1432#issuecomment-1066438336
> Note that because the struct pointers are now Box instead of Arc, it requires the users of these structs to be more careful on managing them. For example, ArrayData::try_from. Users need to keep these Box/raw pointers (in order not to release them too early) and do release after using the array data. > That's why I personally prefer alternative Arc + clone + removing source structs' release approach (see https://github.com/apache/arrow-rs/pull/1436). But I'm fine with Box approach too if this is preferred by the community. I think the "be explicit about memory management" is the typical Rust mantra in this case, so I would prefer the `Box` approach. Perhaps in your use of the FFI structs, you could use `std::mem::forget` if you don't mind not releasing the memory over time and don't want to track the allocations individually. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
