diff --git a/zmap.h b/zmap.h index fc86113..f6ae9dc 100644 --- a/zmap.h +++ b/zmap.h @@ -322,6 +322,7 @@ namespace z_map ~map() { Traits::free(&inner); + inner = {}; } map &operator=(map &&other) noexcept @@ -329,6 +330,7 @@ namespace z_map if (this != &other) { Traits::free(&inner); + inner = {}; inner = other.inner; other.inner = Traits::init(inner.hash_func, inner.cmp_func, inner.load_factor); }