Free nodes as well

This commit is contained in:
Hackerpilot 2014-05-18 09:03:45 +00:00
parent 19dc7c707f
commit 979727b739
1 changed files with 10 additions and 0 deletions

View File

@ -798,6 +798,16 @@ public:
free(cast(void*) prev.bytes.ptr);
free(cast(void*) prev);
}
foreach(nodePointer; buckets)
{
Node* currentNode = nodePointer;
while (currentNode !is null)
{
Node* prev = currentNode;
currentNode = currentNode.next;
free(prev);
}
}
rootBlock = null;
buckets = null;
}