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:
Array() { Table = NULL; }
~Array() { Clear(); }
~Array() { Clear(); }
void Remove() { delete this; }
Word_t Clear() { JudyClearList(this); return JudyLFreeArray(&Table, PJE0); }
Word_t MemoryUsed() { return JudyLMemUsed(Table); }
int Delete(cell Key) { delete Get(Key,true); return JudyLDel(&Table, Key, PJE0 ); }
int Delete(cell Key) { return JudyLDel(&Table, Key, PJE0 ); }
void Set(cell Index, Pvoid_t value, bool disable_check)
{