diff --git a/src/block.rs b/src/block.rs index 2c6ecf6..9635980 100644 --- a/src/block.rs +++ b/src/block.rs @@ -105,6 +105,12 @@ impl<'a> Blocks<'a> { } } +impl<'a> Drop for Blocks<'a> { + fn drop(&mut self) { + unsafe { bindings::ndb_blocks_free(self.as_ptr()) }; + } +} + impl<'a> BlockIter<'a> { pub(crate) fn new_transactional( content: *const ::std::os::raw::c_char,