diff --git a/src/DockAreaWidget.cpp b/src/DockAreaWidget.cpp index 092f997..1696e1f 100644 --- a/src/DockAreaWidget.cpp +++ b/src/DockAreaWidget.cpp @@ -86,6 +86,18 @@ public: } + /** + * Delete widgets without parents in this layout + */ + ~CDockAreaLayout() + { + for(auto Widget : m_Widgets) + { + if(!Widget->parent()) + delete Widget; + } + } + /** * Returns the number of widgets in this layout */