Regex: deallocate Saves memory on ThreadedRegexVM destruction

This commit is contained in:
Maxime Coste 2017-10-07 21:47:55 +08:00
parent 578640c8a4
commit 30dacdade2
2 changed files with 1 additions and 1 deletions

View File

@ -883,7 +883,6 @@ struct TestVM : CompiledRegex, ThreadedRegexVM<const char*, dir>
}
auto test_regex = UnitTest{[]{
{
TestVM<> vm{R"(a*b)"};
kak_assert(vm.exec("b"));

View File

@ -118,6 +118,7 @@ public:
for (size_t i = m_program.save_count-1; i > 0; --i)
saves->pos[i].~Iterator();
saves->~Saves();
::operator delete(saves, sizeof(Saves) + (m_program.save_count-1) * sizeof(Iterator));
}
}