Modified to fix memory leaks and improve speed

This commit is contained in:
Twilight Suzuka
2006-03-16 02:11:48 +00:00
parent 7e97156fc4
commit b6fa60b0bd
18 changed files with 184 additions and 114 deletions

View File

@@ -16,12 +16,13 @@ private:
public:
Keytable() { Table = NULL; }
~Keytable() { Clear(); }
~Keytable() { Clear(); }
void Remove() { delete this; }
Word_t Clear() { JudyClearMap(this); return JudySLFreeArray(&Table, PJE0); }
Word_t MemoryUsed() { return JudyLMemUsed(Table); }
int Delete(char* Key) { delete Get(Key,true); return JudySLDel(&Table, Key, PJE0 ); }
int Delete(char* Key) { return JudySLDel(&Table, Key, PJE0 ); }
void Set(char* Index, Pvoid_t value, bool disable_check)
{