Don't leak memory for allocated modules
This commit is contained in:
parent
ef84c63f69
commit
4f34c68a14
@ -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