You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/07/14 15:20:25 UTC

[GitHub] [arrow] xhochy commented on a change in pull request #7753: ARROW-9385: [Python] finish Fix JPype tests

xhochy commented on a change in pull request #7753:
URL: https://github.com/apache/arrow/pull/7753#discussion_r454437578



##########
File path: python/pyarrow/jvm.py
##########
@@ -43,9 +43,14 @@ def jvm_buffer(arrowbuf):
     pyarrow.Buffer
         Python Buffer that references the JVM memory.
     """
+    import jpype
     address = arrowbuf.memoryAddress()
     size = arrowbuf.capacity()
-    return pa.foreign_buffer(address, size, arrowbuf.asNettyBuffer())
+
+    # TODO: why can we not use arrowbuf as the base?

Review comment:
       Yes, it probably leaks then. I thought that when the Java object gets garbage collected that the memory would be freed. As this doesn't seem to be the case, this is a problem. 
   
   Not sure though how to call something when an object is GC'ed on the Python side.




----------------------------------------------------------------
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:
users@infra.apache.org