BryanCutler commented on a change in pull request #7753:
URL: https://github.com/apache/arrow/pull/7753#discussion_r496398998
##########
File path: python/pyarrow/jvm.py
##########
@@ -28,24 +28,45 @@
import pyarrow as pa
-def jvm_buffer(arrowbuf):
+class _JvmBufferNanny:
+ """
+ An object that keeps a org.apache.arrow.memory.ArrowBuf's underlying
+ memory alive.
+ """
+ ref_manager = None
Review comment:
Hi @pitrou I was trying to understand why you used a static variable
here instead of `jvm_buf.retain()` like before? I'm a little concerned about
how this would behave with multiple threads and buffers that have different
`ReferenceManager`s since `retain()` is called on the static var, but
`release()` is called on the instance var..
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]