pitrou commented on PR #36615: URL: https://github.com/apache/arrow/pull/36615#issuecomment-1631013228
From the POV of Arrow C++, the idiomatic way to solve this issue would be to define your own `Buffer` subclass that keeps the required MATLAB object(s) alive. This is what we already do in PyArrow when we want to view a Numpy array as a PyArrow array: https://github.com/apache/arrow/blob/c09b8c864b1e937a617a104a2b26644fa2f35dc3/python/pyarrow/src/arrow/python/numpy_convert.h#L42-L49 https://github.com/apache/arrow/blob/c09b8c864b1e937a617a104a2b26644fa2f35dc3/python/pyarrow/src/arrow/python/numpy_convert.cc#L40-L58 -- 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]
