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:
Tom Englund 2024-06-13 12:08:02 +02:00 committed by GitHub
parent 9e781040d9
commit e6d10539af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 1 deletions

View file

@ -188,6 +188,9 @@ void Events::listener_monitorDestroy(void* owner, void* data) {
Debug::log(LOG, "Destroy called for monitor {}", pMonitor->output->name);
if (pMonitor->output->idle_frame)
wl_event_source_remove(pMonitor->output->idle_frame);
pMonitor->onDisconnect(true);
pMonitor->output = nullptr;