diff --git a/src/libcalamaresui/modulesystem/ModuleManager.cpp b/src/libcalamaresui/modulesystem/ModuleManager.cpp index dd7abdf29..d08cdf8dd 100644 --- a/src/libcalamaresui/modulesystem/ModuleManager.cpp +++ b/src/libcalamaresui/modulesystem/ModuleManager.cpp @@ -57,7 +57,13 @@ ModuleManager::ModuleManager( const QStringList& paths, QObject* parent ) ModuleManager::~ModuleManager() -{} +{ + // The map is populated with Module::fromDescriptor(), which allocates on the heap. + for( auto moduleptr : m_loadedModulesByInstanceKey ) + { + delete moduleptr; + } +} void