You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "viirya (via GitHub)" <gi...@apache.org> on 2023/02/10 18:06:39 UTC
[GitHub] [arrow-rs] viirya commented on a diff in pull request #3687: Move FFI to sub-crates
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org