diff --git a/src/cache/lru.rs b/src/cache/lru.rs index 74449cf..87832f2 100644 --- a/src/cache/lru.rs +++ b/src/cache/lru.rs @@ -224,6 +224,11 @@ where cb(key, &(*n.value.as_ptr())); } } + // should manually drop kv [MaybeUninit] + unsafe { + ptr::drop_in_place(n.key.as_mut_ptr()); + ptr::drop_in_place(n.value.as_mut_ptr()); + } } }