You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/01 13:26:48 UTC

[GitHub] [arrow-rs] jhorstmann commented on a change in pull request #1494: RFC: Decouple buffer deallocation from ffi and allow creating buffers from rust vec

jhorstmann commented on a change in pull request #1494:
URL: https://github.com/apache/arrow-rs/pull/1494#discussion_r840584006



##########
File path: arrow/src/alloc/mod.rs
##########
@@ -121,3 +124,30 @@ pub unsafe fn reallocate<T: NativeType>(
         handle_alloc_error(Layout::from_size_align_unchecked(new_size, ALIGNMENT))
     })
 }
+
+/// The owner of an allocation, that is not natively allocated.
+/// The trait implementation is responsible for dropping the allocations once no more references exist.
+pub trait Allocation: RefUnwindSafe {}

Review comment:
       I added an explicit test that `Buffer` is `UnwindSafe` to make this requirement clearer.




-- 
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