adamreeve commented on code in PR #483:
URL: https://github.com/apache/arrow-dotnet/pull/483#discussion_r4332142545
##########
test/Apache.Arrow.Tests/CDataInterfaceDataTests.cs:
##########
@@ -298,5 +302,75 @@ RecordBatch GetTestRecordBatch()
CArrowArray.Free(cArray);
}
+ [Fact]
+ public async Task ExportedArrayStreamDisposesBatchesOnRelease()
+ {
+ var allocator = new TestMemoryAllocator();
+ RecordBatch batch = GetAllocatorBackedRecordBatch(allocator);
Review Comment:
Could you please also add a test case where the record batch buffers are
constructed from `ReadOnlyMemory<byte>` instances, so that we can exercise the
`ArrowBuffer.TryExport` path that pins the memory? If the buffers are allocated
by `NativeMemoryAllocator`, we can verify that the throw on dispose isn't hit
after the memory is unpinned.
--
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]