Don't leak memory for allocated modules

This commit is contained in:
Adriaan de Groot 2017-08-30 07:46:01 -04:00 committed by Philip
parent ef84c63f69
commit 4f34c68a14

View File

@ -57,7 +57,13 @@ ModuleManager::ModuleManager( const QStringList& paths, QObject* parent )
ModuleManager::~ModuleManager() ModuleManager::~ModuleManager()
{} {
// The map is populated with Module::fromDescriptor(), which allocates on the heap.
for( auto moduleptr : m_loadedModulesByInstanceKey )
{
delete moduleptr;
}
}
void void