Fix Clipper2 memory leak

This commit is contained in:
Seth Hillbrand 2022-12-18 11:45:49 -08:00
parent a9acb2e215
commit f8d2bdbdf9
1 changed files with 5 additions and 1 deletions

View File

@ -311,7 +311,11 @@ namespace Clipper2Lib {
void Clear() override
{
for (const PolyPath64* child : childs_) delete child;
for (PolyPath64* child : childs_)
{
child->Clear();
delete child;
}
childs_.resize(0);
}