From 69bcbb269d3d40d173cda8e0ccca5a614ab6a428 Mon Sep 17 00:00:00 2001 From: Dirk Van Haerenborgh Date: Thu, 13 Dec 2018 06:41:05 +0100 Subject: do not drop message and thread --- src/thread.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/thread.rs') diff --git a/src/thread.rs b/src/thread.rs index 1fb6814..3b58a3e 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -15,11 +15,13 @@ pub(crate) struct ThreadPtr { pub ptr: *mut ffi::notmuch_thread_t, } -impl Drop for ThreadPtr { - fn drop(&mut self) { - unsafe { ffi::notmuch_thread_destroy(self.ptr) }; - } -} +// TODO: The iterator doesn't actually own these, so dropping these will +// generate a segfault when a new iterator is constructed. +// impl Drop for ThreadPtr { +// fn drop(&mut self) { +// unsafe { ffi::notmuch_thread_destroy(self.ptr) }; +// } +// } #[derive(Debug)] pub struct Thread<'o, O> -- cgit v1.2.1