pitrou commented on a change in pull request #9887:
URL: https://github.com/apache/arrow/pull/9887#discussion_r607942405
##########
File path: rust/arrow/src/ffi.rs
##########
@@ -395,6 +397,12 @@ unsafe extern "C" fn release_array(array: *mut
FFI_ArrowArray) {
// take ownership of `private_data`, therefore dropping it
Box::from_raw(array.private_data as *mut PrivateData);
+ // release children
+ for i in 0..array.n_children {
+ let child = *array.children.add(i as usize);
+ release_array(child);
Review comment:
You should call the release callback stored on `child`, not
`release_array` directly.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]