mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-13 16:07:36 +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:
parent
e28b15b41a
commit
97626c467f
1 changed files with 15 additions and 4 deletions
|
@ -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] =
|
||||
|
|
Loading…
Reference in a new issue