Actually free the projects before the settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/10973
This commit is contained in:
Jeff Young 2022-12-01 00:04:48 +00:00
parent d23f285f8c
commit f5770fe7e0
1 changed files with 8 additions and 0 deletions

View File

@ -70,8 +70,16 @@ SETTINGS_MANAGER::SETTINGS_MANAGER( bool aHeadless ) :
SETTINGS_MANAGER::~SETTINGS_MANAGER()
{
for( std::unique_ptr<PROJECT>& project : m_projects_list )
project.reset();
m_projects.clear();
for( std::unique_ptr<JSON_SETTINGS>& settings : m_settings )
settings.reset();
m_settings.clear();
m_color_settings.clear();
}