X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/384b4373c7ce592248284787a97fa2909821e906..e55ad60e195f1007db921b2a73a3cac98ed9df65:/src/common/hash.cpp diff --git a/src/common/hash.cpp b/src/common/hash.cpp index f4139dd5f9..69b17fd56e 100644 --- a/src/common/hash.cpp +++ b/src/common/hash.cpp @@ -48,11 +48,18 @@ wxHashTable::wxHashTable (int the_key_type, int size) wxHashTable::~wxHashTable (void) { + Destroy(); +} + +void wxHashTable::Destroy(void) +{ + if (!hash_table) return; int i; for (i = 0; i < n; i++) if (hash_table[i]) delete hash_table[i]; delete[] hash_table; + hash_table = NULL; } bool wxHashTable::Create(int the_key_type, int size)