Free solution memory in Clipper2

The PolyTree64 memory is not automatically freed in the dtor, so call
this explicitly
This commit is contained in:
Seth Hillbrand 2022-12-04 16:48:22 -08:00
parent a8cb0ee116
commit 83ced602a6
1 changed files with 2 additions and 0 deletions

View File

@ -808,6 +808,7 @@ void SHAPE_POLY_SET::booleanOp( Clipper2Lib::ClipType aType, const SHAPE_POLY_SE
c.Execute( aType, Clipper2Lib::FillRule::NonZero, solution );
importTree( solution, zValues, arcBuffer );
solution.Clear(); // Free used memory (not done in dtor)
}
@ -1059,6 +1060,7 @@ void SHAPE_POLY_SET::inflate2( int aAmount, int aCircleSegCount, CORNER_STRATEGY
c2.Execute(ClipType::Union, FillRule::Positive, tree);
importTree( tree, zValues, arcBuffer );
tree.Clear();
}