- for(unsigned int i=0;i<capacity;i++) {
- struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> * bin = table[i];
- while(bin!=NULL) {
- struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> * next=bin->next;
- delete bin;
- bin=next;
- }
- }
- memset(table, 0, capacity*sizeof(struct hashlistnode<_Key, _Val, _malloc, _calloc, _free> *));
+ memset(table, 0, capacity*sizeof(struct hashlistnode<_Key, _Val>));