7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-11 14:40:11 +00:00

Fix Clipper2 memory leak

This commit is contained in:
Seth Hillbrand 2022-12-18 11:45:49 -08:00
parent a9acb2e215
commit f8d2bdbdf9

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);
}