Regex: deallocate Saves memory on ThreadedRegexVM destruction
This commit is contained in:
parent
578640c8a4
commit
30dacdade2
|
@ -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"));
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user