[mio] 回收计数器

This commit is contained in:
lubeilin
2024-03-02 11:50:18 +08:00
parent b0d6b1f884
commit 5264455eba
+7
View File
@@ -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 {}