1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-12 19:41:18 +00:00

ringer: Move libfeedback related cleanup to finalize()

Leave the LfbEvent self->event alive in dispose()
to give potentially pending GAsyncReadyCallback invocations
or running GSources a better chance of finishing gracefully.
This commit is contained in:
Evangelos Ribeiro Tzaras 2022-08-18 20:57:46 +02:00
parent fd4074ec23
commit 628389cf15

View file

@ -463,10 +463,6 @@ dispose (GObject *object)
{
CallsRinger *self = CALLS_RINGER (object);
if (self->event) {
g_clear_object (&self->event);
lfb_uninit ();
}
g_signal_handlers_disconnect_by_data (calls_manager_get_default (), self);
g_clear_handle_id (&self->restart_id, g_source_remove);
@ -475,6 +471,20 @@ dispose (GObject *object)
}
static void
finalize (GObject *object)
{
CallsRinger *self = CALLS_RINGER (object);
if (self->event)
lfb_uninit ();
g_clear_object (&self->event);
G_OBJECT_CLASS (calls_ringer_parent_class)->finalize (object);
}
static void
calls_ringer_class_init (CallsRingerClass *klass)
{
@ -482,6 +492,7 @@ calls_ringer_class_init (CallsRingerClass *klass)
object_class->constructed = constructed;
object_class->dispose = dispose;
object_class->finalize = finalize;
object_class->get_property = get_property;
props[PROP_IS_RINGING] =