diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp index d877d0c630..aeeee6fc73 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp @@ -204,8 +204,10 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) * Thermal shapes will be created later if necessary */ int item_clearance; + // static to avoid unnecessary memory allocation when filling many zones. static std::vector cornerBufferPolysToSubstract; + cornerBufferPolysToSubstract.clear(); D_PAD dummyPad( (MODULE*) NULL ); D_PAD* nextpad;