From 5264455eba1e63f35a8a5cc43d448c17078a1987 Mon Sep 17 00:00:00 2001 From: lubeilin <1791778603@qq.com> Date: Sat, 2 Mar 2024 11:50:18 +0800 Subject: [PATCH] =?UTF-8?q?[mio]=20=E5=9B=9E=E6=94=B6=E8=AE=A1=E6=95=B0?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnt/src/util/counter/adder.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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 {}