From 86baa52d2235d6add6e68ae38755ebd9435483bd Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 1 Dec 2004 18:33:33 +0000 Subject: [PATCH] Applied patch to "correct" hashmap's freeing of memory. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/hashmap.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 8c234228f2..7e20a9abc2 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -101,6 +101,10 @@ protected: { return (void **)calloc(sz, sizeof(void*)); } + static void FreeTable(void *table) + { + free(table); + } }; #define _WX_DECLARE_HASHTABLE( VALUE_T, KEY_T, HASH_T, KEY_EX_T, KEY_EQ_T, CLASSNAME, CLASSEXP, SHOULD_GROW, SHOULD_SHRINK ) \ @@ -248,7 +252,7 @@ public: \ { \ clear(); \ \ - free(m_table); \ + FreeTable(m_table); \ } \ \ hasher hash_funct() { return m_hasher; } \ @@ -379,7 +383,7 @@ protected: \ this, (_wxHashTable_NodeBase**)m_table, \ (BucketFromNode)GetBucketForNode,\ (ProcessNode)&DummyProcessNode ); \ - free(srcTable); \ + FreeTable(srcTable); \ } \ \ /* this must be called _after_ m_table has been cleaned */ \ -- 2.50.0