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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
}