diff --git a/codes/cpp/chapter_hashing/hash_map_chaining.cpp b/codes/cpp/chapter_hashing/hash_map_chaining.cpp index 17ca744cc..ef8fc11d5 100644 --- a/codes/cpp/chapter_hashing/hash_map_chaining.cpp +++ b/codes/cpp/chapter_hashing/hash_map_chaining.cpp @@ -92,6 +92,8 @@ class HashMapChaining { for (auto &bucket : bucketsTmp) { for (Pair *pair : bucket) { put(pair->key, pair->val); + // ι‡Šζ”Ύε†…ε­˜ + delete pair; } } }