- n = table.n;
- current_position = table.current_position;
- current_node = NULL; // doesn't matter - Next() will reconstruct it
- key_type = table.key_type;
-
- hash_table = new wxList *[n];
- for (int i = 0; i < n; i++) {
- if (table.hash_table[i] == NULL)
- hash_table[i] = NULL;
- else {
- hash_table[i] = new wxList(key_type);
- *(hash_table[i]) = *(table.hash_table[i]);
+ for( size_t i = 0; i < m_size; ++i )
+ {
+ Node* end = m_table[i];
+
+ if( end == NULL )
+ continue;
+
+ Node *curr, *next = end->GetNext();
+
+ do
+ {
+ curr = next;
+ next = curr->GetNext();
+
+ DoDestroyNode( curr );
+
+ delete curr;
+ }
+ while( curr != end );
+
+ m_table[i] = NULL;