diff --git a/vnt/src/util/counter/adder.rs b/vnt/src/util/counter/adder.rs index fc150e3..41b840f 100644 --- a/vnt/src/util/counter/adder.rs +++ b/vnt/src/util/counter/adder.rs @@ -49,6 +49,13 @@ impl SingleU64AdderInner { unsafe { *self.ptr } } } +impl Drop for SingleU64AdderInner{ + fn drop(&mut self) { + unsafe { + let _ = Box::from_raw(self.ptr); + } + } +} unsafe impl Send for SingleU64AdderInner {}