mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
colorchooserdialog: Fix disposing
We need to drop our widgetry in dispose to prevent leakage.
This commit is contained in:
parent
b6bfeb786f
commit
4b144855b9
@ -191,12 +191,23 @@ gtk_color_chooser_dialog_set_property (GObject *object,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_color_chooser_dialog_dispose (GObject *object)
|
||||||
|
{
|
||||||
|
GtkColorChooserDialog *cc = GTK_COLOR_CHOOSER_DIALOG (object);
|
||||||
|
|
||||||
|
g_clear_pointer (&cc->chooser, gtk_widget_unparent);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (gtk_color_chooser_dialog_parent_class)->dispose (object);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_color_chooser_dialog_class_init (GtkColorChooserDialogClass *class)
|
gtk_color_chooser_dialog_class_init (GtkColorChooserDialogClass *class)
|
||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||||
|
|
||||||
|
object_class->dispose = gtk_color_chooser_dialog_dispose;
|
||||||
object_class->get_property = gtk_color_chooser_dialog_get_property;
|
object_class->get_property = gtk_color_chooser_dialog_get_property;
|
||||||
object_class->set_property = gtk_color_chooser_dialog_set_property;
|
object_class->set_property = gtk_color_chooser_dialog_set_property;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user