Don't leak memory for allocated modules
This commit is contained in:
parent
d5dca07e22
commit
e26d5ab206
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user