Browse Source

Free solution memory in Clipper2

The PolyTree64 memory is not automatically freed in the dtor, so call
this explicitly
7.0
Seth Hillbrand 3 years ago
parent
commit
83ced602a6
  1. 2
      libs/kimath/src/geometry/shape_poly_set.cpp

2
libs/kimath/src/geometry/shape_poly_set.cpp

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

Loading…
Cancel
Save