summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2024-06-13 12:08:02 +0200
committerGitHub <noreply@github.com>2024-06-13 12:08:02 +0200
commite6d10539af1fdca33b10bc3c1dfac16f1cdfe1c8 (patch)
tree334acfe23108cb171f496e47f7a0069943b003b7 /src/Compositor.cpp
parent9e781040d9067c2711ec2e9f5b47b76ef70762b3 (diff)
core: fix a few small memory leaks on exit (#6470)
* renderer: add destructor and destroy event source add destructor and destroy the event source. one less leak on exit of compositor reported by asan. * compositor: cleanup eventloop on exit destruct hyprctl to release the event sources, and properly cleanup the event loop on exit of compositor. less leaks on exit reported by asan * threadmgr: destroy event source on destruction destroy the event source on destruction. * eventloopmgr: reset eventloopmgr on exit aswell reset the eventloopmanager on exit of compositor and free the leaking last idle frame on monitor destroy.
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 8f36b4ae..2f972335 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -351,6 +351,8 @@ void CCompositor::cleanup() {
g_pXWaylandManager.reset();
g_pPointerManager.reset();
g_pSeatManager.reset();
+ g_pHyprCtl.reset();
+ g_pEventLoopManager.reset();
if (m_sWLRRenderer)
wlr_renderer_destroy(m_sWLRRenderer);
@@ -364,6 +366,7 @@ void CCompositor::cleanup() {
if (m_critSigSource)
wl_event_source_remove(m_critSigSource);
+ wl_event_loop_destroy(m_sWLEventLoop);
wl_display_terminate(m_sWLDisplay);
m_sWLDisplay = nullptr;