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



##########
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:
       added a `CurrentAlloc` function to the `CheckedAllocator` and have 
everything in the test use that in order to expose a function that allows 
confirming the Go memory has been released.




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