We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffa0105 commit 2f041a0Copy full SHA for 2f041a0
src/DockManager.cpp
@@ -505,6 +505,20 @@ CDockManager::CDockManager(QWidget *parent) :
505
//============================================================================
506
CDockManager::~CDockManager()
507
{
508
+ // fix memory leaks, see https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/307
509
+ std::vector<ads::CDockAreaWidget*> areas;
510
+ for ( int i = 0; i != dockAreaCount(); ++i )
511
+ {
512
+ areas.push_back( dockArea(i) );
513
+ }
514
+ for ( auto area : areas )
515
516
+ for ( auto widget : area->dockWidgets() )
517
+ delete widget;
518
+
519
+ delete area;
520
521
522
auto FloatingWidgets = d->FloatingWidgets;
523
for (auto FloatingWidget : FloatingWidgets)
524
0 commit comments