Fix memory leak in COLOR_SETTINGS
This commit is contained in:
parent
580293c7fa
commit
599c35edce
|
@ -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 )
|
||||||
|
|
Loading…
Reference in New Issue