Free nodes as well
This commit is contained in:
parent
19dc7c707f
commit
979727b739
10
std/lexer.d
10
std/lexer.d
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue