mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
DolphinQt2/MainWindow: Resolve a memory leak on systems with X11
In the case we had X11 libs available, we'd allocate an XRRConfiguration instance and pass it to the GraphicsWindow instance, but it would never actually be freed.
This commit is contained in:
@ -221,12 +221,11 @@ void MainWindow::CreateComponents()
|
||||
&MemoryWidget::Update);
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
m_graphics_window = new GraphicsWindow(
|
||||
new X11Utils::XRRConfiguration(
|
||||
static_cast<Display*>(QGuiApplication::platformNativeInterface()->nativeResourceForWindow(
|
||||
"display", windowHandle())),
|
||||
winId()),
|
||||
this);
|
||||
m_xrr_config = std::make_unique<X11Utils::XRRConfiguration>(
|
||||
static_cast<Display*>(QGuiApplication::platformNativeInterface()->nativeResourceForWindow(
|
||||
"display", windowHandle())),
|
||||
winId());
|
||||
m_graphics_window = new GraphicsWindow(m_xrr_config.get(), this);
|
||||
#else
|
||||
m_graphics_window = new GraphicsWindow(nullptr, this);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user