Memory leak (#242)

* Delete widgets without parents in CDockAreaLayout.

* Fixed the place where dock widgets witout parents are destroyed.
This commit is contained in:
shelomentsev
2020-08-21 11:08:33 +05:00
committed by GitHub
parent a4d281dbb6
commit 0eca1b0433

View File

@@ -484,6 +484,12 @@ CDockManager::~CDockManager()
{
delete FloatingWidget;
}
auto DockWidgetsMap = d->DockWidgetsMap;
for(auto DockWidget : d->DockWidgetsMap)
{
if(!DockWidget->parent())
delete DockWidget;
}
delete d;
}