RegressionTests: Fix performance issues related to DockManager::restoreState

* Performance: Disable DockManager::restoreState when running regression tests
* Set parent to Qt widgets to avoid memory leak
* Change singleton pattern to avoid memory leak
This commit is contained in:
Magne Sjaastad
2022-12-22 15:35:45 +01:00
committed by GitHub
parent 5d072663f1
commit 9db4d03a5f
4 changed files with 22 additions and 13 deletions

View File

@@ -54,8 +54,9 @@ bool is_region_to_region( const std::string& keyword )
//--------------------------------------------------------------------------------------------------
RiuSummaryQuantityNameInfoProvider* RiuSummaryQuantityNameInfoProvider::instance()
{
static auto* singleton = new RiuSummaryQuantityNameInfoProvider;
return singleton;
static RiuSummaryQuantityNameInfoProvider theInstance;
return &theInstance;
}
//--------------------------------------------------------------------------------------------------