You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2018/04/03 04:52:34 UTC

[arrow] branch master updated: ARROW-2375: [Rust] Implement Drop for Buffer so memory is released

This is an automated email from the ASF dual-hosted git repository.

uwe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 4c68eca  ARROW-2375: [Rust] Implement Drop for Buffer so memory is released
4c68eca is described below

commit 4c68eca7e20c5d4305ba6a27151b80268a42b690
Author: Andy Grove <an...@gmail.com>
AuthorDate: Tue Apr 3 06:52:28 2018 +0200

    ARROW-2375: [Rust] Implement Drop for Buffer so memory is released
    
    Author: Andy Grove <an...@gmail.com>
    
    Closes #1821 from andygrove/drop_buffer and squashes the following commits:
    
    24d8b50 <Andy Grove> Merge branch 'master' into drop_buffer
    43d3988 <Andy Grove> implement Drop for Buffer so memory is released
---
 rust/src/buffer.rs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/rust/src/buffer.rs b/rust/src/buffer.rs
index e8c884e..758d5c1 100644
--- a/rust/src/buffer.rs
+++ b/rust/src/buffer.rs
@@ -89,6 +89,12 @@ impl<T> Iterator for BufferIterator<T> where T: Copy {
     }
 }
 
+impl<T> Drop for Buffer<T> {
+    fn drop(&mut self) {
+        mem::drop(self.data)
+    }
+}
+
 macro_rules! array_from_primitive {
     ($DT: ty) => {
         impl From<Vec<$DT>> for Buffer<$DT> {

-- 
To stop receiving notification emails like this one, please contact
uwe@apache.org.