mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-23 20:15:32 +00:00
call-record-row: Unparent popover in dispose
Finalize is too late to break reference cycles. Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/756>
This commit is contained in:
parent
6d9b88546d
commit
4baa4f5141
1 changed files with 3 additions and 13 deletions
|
@ -494,6 +494,9 @@ static void
|
|||
dispose (GObject *object)
|
||||
{
|
||||
CallsCallRecordRow *self = CALLS_CALL_RECORD_ROW (object);
|
||||
GtkWidget *popover = GTK_WIDGET (self->popover);
|
||||
|
||||
g_clear_pointer (&popover, gtk_widget_unparent);
|
||||
|
||||
g_clear_object (&self->contact);
|
||||
g_clear_object (&self->action_map);
|
||||
|
@ -507,18 +510,6 @@ dispose (GObject *object)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
finalize (GObject *object)
|
||||
{
|
||||
CallsCallRecordRow *self = CALLS_CALL_RECORD_ROW (object);
|
||||
|
||||
GtkWidget *popover = GTK_WIDGET (self->popover);
|
||||
|
||||
g_clear_pointer (&popover, gtk_widget_unparent);
|
||||
|
||||
G_OBJECT_CLASS (calls_call_record_row_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
calls_call_record_row_class_init (CallsCallRecordRowClass *klass)
|
||||
|
@ -530,7 +521,6 @@ calls_call_record_row_class_init (CallsCallRecordRowClass *klass)
|
|||
object_class->constructed = constructed;
|
||||
object_class->get_property = get_property;
|
||||
object_class->dispose = dispose;
|
||||
object_class->finalize = finalize;
|
||||
|
||||
props[PROP_RECORD] =
|
||||
g_param_spec_object ("record",
|
||||
|
|
Loading…
Reference in a new issue