pitrou opened a new issue, #38281: URL: https://github.com/apache/arrow/issues/38281
### Describe the bug, including details regarding any error messages, version, and platform. The current implementation of array and record batch importation in Go [sets a finalizer](https://github.com/apache/arrow/blob/main/go/arrow/cdata/cdata.go#L433-L439) to trigger the release callback when any reference to the underlying `ArrayData` is collected. Unfortunately, Go finalizers are unreliable and even a GC run is not necessarily sufficient to get them invoked. Relevant excerpts from https://pkg.go.dev/runtime#SetFinalizer : > The finalizer is scheduled to run at some arbitrary time after the program can no longer reach the object to which obj points. There is no guarantee that finalizers will run before a program exits, so typically they are useful only for releasing non-memory resources associated with an object during a long-running program. > A single goroutine runs all finalizers for a program, sequentially. ### Component(s) 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]
