hcrosse opened a new pull request, #1734: URL: https://github.com/apache/arrow-go/pull/1734
### Rationale for this change Follow-up to #1673. In `BinaryViewBuilder.newData`, the builder releases its references to finished data blocks only when the view buffer is non-nil. Calling `ReserveData` on an empty view builder allocates a data block while leaving the view buffer nil, so calling `NewArray` leaks that block even after releasing both the array and the builder. ### What changes are included in this PR? - Move releasing the builder's references to finished data blocks outside the non-nil view buffer guard in `BinaryViewBuilder.newData`, after `NewData` retains them. ### Are these changes tested? Yes. I added checked-allocator tests covering empty `ReserveData` builds on binary and string view builders, null-only and inline-only builds, `Reserve` combined with `ReserveData`, and reused builder cycles. ### Are there any user-facing changes? `BinaryViewBuilder` and `StringViewBuilder` no longer leak reserved data blocks when `NewArray` is called on a builder with no appended views. -- 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]
