Copilot commented on code in PR #1526:
URL: https://github.com/apache/arrow-go/pull/1526#discussion_r4543853256


##########
arrow/cdata/cdata_exports.go:
##########
@@ -346,6 +347,9 @@ func exportArray(arr arrow.Array, out *CArrowArray, 
outSchema *CArrowSchema) {
        if outSchema != nil {
                exportField(arrow.Field{Type: arr.DataType()}, outSchema)
        }
+       if ext, ok := arr.(array.ExtensionArray); ok {
+               arr = ext.Storage()

Review Comment:
   Exporting an extension backed by string/binary-view storage with out-of-line 
data now allocates a trailing sizes buffer, but `releaseExportedArray` 
(`exports.go:128–130`) only frees the buffer-pointer array. Each export 
therefore leaks this C allocation even after the exported array is released. 
Free the auxiliary sizes buffer in the release callback, or allocate it 
together with the buffer-pointer array so the existing free releases both.



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