From ea259fd093f23832c521c067f06d90e1c35c5ee2 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Sun, 25 Sep 2022 14:57:42 +0100 Subject: [PATCH] Remove extra creation of an outline for the soldermask zone The zone class initializes the outline with an empty SHAPE_POLY_SET, so adding a new SHAPE_POLY_SET outline in the BOARD constructor causes a leak of the original. --- pcbnew/board.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp index c2d8b128f2..7f04d09f0f 100644 --- a/pcbnew/board.cpp +++ b/pcbnew/board.cpp @@ -93,7 +93,6 @@ BOARD::BOARD() : m_SolderMask = new ZONE( this ); m_SolderMask->SetLayerSet( LSET().set( F_Mask ).set( B_Mask ) ); - m_SolderMask->SetOutline( new SHAPE_POLY_SET() ); int infinity = ( std::numeric_limits::max() / 2 ) - pcbIUScale.mmToIU( 1 ); m_SolderMask->Outline()->NewOutline(); m_SolderMask->Outline()->Append( VECTOR2I( -infinity, -infinity ) );