From 0397339ab1fbdf6309ab14dbf48946853c608522 Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:58:16 -0700 Subject: DolphinQt: Properly Delete (Some) Widgets This is not every memory leak, just the ones that were obvious. --- Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp') diff --git a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp index e4897a24a8..8fba6d4066 100644 --- a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp @@ -309,6 +309,7 @@ void BreakpointWidget::OnClear() void BreakpointWidget::OnNewBreakpoint() { BreakpointDialog* dialog = new BreakpointDialog(this); + dialog->setAttribute(Qt::WA_DeleteOnClose, true); SetQWidgetWindowDecorations(dialog); dialog->exec(); } @@ -319,6 +320,7 @@ void BreakpointWidget::OnEditBreakpoint(u32 address, bool is_instruction_bp) { auto* dialog = new BreakpointDialog(this, m_system.GetPowerPC().GetBreakPoints().GetBreakpoint(address)); + dialog->setAttribute(Qt::WA_DeleteOnClose, true); SetQWidgetWindowDecorations(dialog); dialog->exec(); } @@ -326,6 +328,7 @@ void BreakpointWidget::OnEditBreakpoint(u32 address, bool is_instruction_bp) { auto* dialog = new BreakpointDialog(this, m_system.GetPowerPC().GetMemChecks().GetMemCheck(address)); + dialog->setAttribute(Qt::WA_DeleteOnClose, true); SetQWidgetWindowDecorations(dialog); dialog->exec(); } @@ -387,6 +390,7 @@ void BreakpointWidget::OnContextMenu() const auto is_memory_breakpoint = selected_item->data(IS_MEMCHECK_ROLE).toBool(); auto* menu = new QMenu(this); + menu->setAttribute(Qt::WA_DeleteOnClose, true); if (!is_memory_breakpoint) { -- cgit v1.2.3