viirya commented on code in PR #3687:
URL: https://github.com/apache/arrow-rs/pull/3687#discussion_r1103067645
##########
arrow/src/ffi_stream.rs:
##########
@@ -203,11 +204,11 @@ impl ExportedArrayStream {
let schema = FFI_ArrowSchema::try_from(reader.schema().as_ref());
match schema {
- Ok(mut schema) => unsafe {
- std::ptr::copy(&schema as *const FFI_ArrowSchema, out, 1);
- schema.release = None;
+ Ok(schema) => {
+ unsafe { std::ptr::copy(addr_of!(schema), out, 1) };
+ std::mem::forget(schema);
Review Comment:
By `forget`ing it, will some non-pointer fields like `flags` and
`n_children` be released?
--
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]