Fix memory leak in COLOR_SETTINGS

This commit is contained in:
Werni 2020-12-24 00:24:44 +00:00 committed by Jon Evans
parent 580293c7fa
commit 599c35edce
1 changed files with 4 additions and 0 deletions

View File

@ -368,6 +368,10 @@ std::vector<COLOR_SETTINGS*> COLOR_SETTINGS::CreateBuiltinColorSettings()
COLOR_SETTINGS* classicTheme = new COLOR_SETTINGS( wxT( "_builtin_classic" ) ); COLOR_SETTINGS* classicTheme = new COLOR_SETTINGS( wxT( "_builtin_classic" ) );
classicTheme->SetName( _( "KiCad Classic" ) ); classicTheme->SetName( _( "KiCad Classic" ) );
classicTheme->m_writeFile = false; classicTheme->m_writeFile = false;
for( PARAM_BASE* param : classicTheme->m_params )
delete param;
classicTheme->m_params.clear(); // Disable load/store classicTheme->m_params.clear(); // Disable load/store
for( const std::pair<int, COLOR4D> entry : s_classicTheme ) for( const std::pair<int, COLOR4D> entry : s_classicTheme )