mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 06:01:56 -07:00
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.
This commit is contained in:
@@ -90,6 +90,11 @@ CHyprRenderer::CHyprRenderer() {
|
||||
wl_event_source_timer_update(m_pCursorTicker, 500);
|
||||
}
|
||||
|
||||
CHyprRenderer::~CHyprRenderer() {
|
||||
if (m_pCursorTicker)
|
||||
wl_event_source_remove(m_pCursorTicker);
|
||||
}
|
||||
|
||||
static void renderSurface(SP<CWLSurfaceResource> surface, int x, int y, void* data) {
|
||||
if (!surface->current.buffer || !surface->current.buffer->texture)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user