clutter: Fix ClutterMainContext leaking events
There's still a possibility that some events remain within the `ClutterMainContext` when it's being unref-ed for the last time (as seen on asan logs). Make sure they get freed by using `g_async_queue_new_full()` and specifying the appropriate destroy function. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2817>
This commit is contained in:
parent
6ff7f43fcf
commit
fbe7a8df3a
@ -614,7 +614,8 @@ clutter_context_new (ClutterBackendConstructor backend_constructor,
|
||||
_clutter_settings_set_backend (clutter_context->settings,
|
||||
clutter_context->backend);
|
||||
|
||||
clutter_context->events_queue = g_async_queue_new ();
|
||||
clutter_context->events_queue =
|
||||
g_async_queue_new_full ((GDestroyNotify) clutter_event_free);
|
||||
clutter_context->last_repaint_id = 1;
|
||||
|
||||
if (!clutter_init_real (clutter_context, error))
|
||||
|
Loading…
Reference in New Issue
Block a user