sgilmore10 opened a new issue, #36614: URL: https://github.com/apache/arrow/issues/36614
### Describe the enhancement requested When building `arrow.array.<Numeric>Arrays` from native MATLAB arrays, we avoid copying by 1. Wrapping the MATLAB data inside a non-owning `arrow::Buffer` 2. Constructing an `arrow::ArrayData` object from the `arrow::Buffer` 3. Constructing the `arrow::Array` from the `arrow::Data` object. Because the array's buffer does not own its backing data, we have been storing the original MATLAB array as a property called `MatlabArray` on the MATLAB `arrow.array.<Numeric>Arrays` classes. This solution is not ideal because the backing MATLAB array is kept separate from the actual `std::shared_ptr<arrow::Array>`, which is stored within the C++ proxy objects (e.g. `arrow::matlab::array::proxy::NumericArray<float64>`). It would be much cleaner if the C++ proxy objects were also responsible for keeping the original MATLAB array alive. ### Component(s) MATLAB -- 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]
