From 7dde0c3c319577fd913e4de72a6113a8998ada49 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" <277429+mackal@users.noreply.github.com> Date: Tue, 4 Apr 2023 16:07:06 -0400 Subject: [PATCH] DolphinQt: non-Windows builds leak in InterfacePane The m_checkbox_lock_mouse QCheckBox was only conditionally being added to the layout, leaving it unmanaged and leaking Setting the parent will allow it to be managed. --- Source/Core/DolphinQt/Settings/InterfacePane.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.cpp b/Source/Core/DolphinQt/Settings/InterfacePane.cpp index f7590872cf..9365795551 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.cpp +++ b/Source/Core/DolphinQt/Settings/InterfacePane.cpp @@ -189,7 +189,8 @@ void InterfacePane::CreateInGame() m_vboxlayout_hide_mouse->addWidget(m_radio_cursor_visible_never); m_vboxlayout_hide_mouse->addWidget(m_radio_cursor_visible_always); - m_checkbox_lock_mouse = new QCheckBox(tr("Lock Mouse Cursor")); + // this ends up not being managed unless _WIN32, so lets not leak + m_checkbox_lock_mouse = new QCheckBox(tr("Lock Mouse Cursor"), this); m_checkbox_lock_mouse->setToolTip(tr("Will lock the Mouse Cursor to the Render Widget as long as " "it has focus. You can set a hotkey to unlock it."));