Valgrind: Remove factories from object pool when destroying them

Otherwise we get crashes on exit.

Change-Id: I806f374ba8f835c9e4361599aa901cfc4b2f0720
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-05-11 09:57:07 +02:00
parent 83d958ae4e
commit 1a248b1b93
2 changed files with 2 additions and 2 deletions

View File

@@ -1014,7 +1014,7 @@ void initCallgrindTool()
void destroyCallgrindTool()
{
ExtensionSystem::PluginManager::addObject(theCallgrindRunControlFactory);
ExtensionSystem::PluginManager::removeObject(theCallgrindRunControlFactory);
delete theCallgrindRunControlFactory;
theCallgrindRunControlFactory = 0;
}

View File

@@ -728,7 +728,7 @@ void initMemcheckTool()
void destroyMemcheckTool()
{
ExtensionSystem::PluginManager::addObject(theMemcheckRunControlFactory);
ExtensionSystem::PluginManager::removeObject(theMemcheckRunControlFactory);
delete theMemcheckRunControlFactory;
theMemcheckRunControlFactory = 0;
}