Skip to content
Snippets Groups Projects
Commit 637c71b4 authored by Franck Dary's avatar Franck Dary
Browse files

Removed memory leak, it's ok now

parent 456f30d2
Branches
No related tags found
No related merge requests found
......@@ -57,6 +57,9 @@ class LimitedStack
lastElementIndex = 0;
present[data[lastElementIndex]]--;
if (present[data[lastElementIndex]] <= 0)
present.erase(present.find(data[lastElementIndex]));
data[lastElementIndex] = elem;
present[data[lastElementIndex]]++;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment