zeroshade commented on a change in pull request #11220:
URL: https://github.com/apache/arrow/pull/11220#discussion_r716773108



##########
File path: go/arrow/cdata/test/test_export_to_cgo.py
##########
@@ -91,5 +93,22 @@ def test_record_batch(self):
             cgotest.importRecordBatch(self.ptr_schema, self.ptr_array)
 
 
+class TestGoToPython(BaseTestGoPython):
+
+    def test_get_schema(self):
+        with self.assert_pyarrow_memory_released():
+            cgotest.exportSchema(self.ptr_schema)
+
+            sc = pa.Schema._import_from_c(self.ptr_schema)
+            assert sc == self.make_schema()
+    
+    def test_get_batch(self):
+        with self.assert_pyarrow_memory_released():

Review comment:
       We have an "allocator" object in the Go that I could expose a reference 
to for the tests which would then provide a way to check that the Go memory got 
freed. I'll see what i can do, but that's a really good point. It also ties 
into #11206 a bit where I set up a way to directly use and reference the 
`MemoryPool` in the C++ from Go




-- 
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]


Reply via email to