X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c67daf87774c71ae9f73af9969008af220e52a11..6c905cb7fdc856317f1e1db9c6d6aaa93c67920c:/src/common/hash.cpp?ds=inline 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)