mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
stackswitcher: do not leak buttons hash table
This commit is contained in:
parent
7ac684e9e3
commit
63b90bb5b8
@ -478,6 +478,19 @@ gtk_stack_switcher_dispose (GObject *object)
|
|||||||
G_OBJECT_CLASS (gtk_stack_switcher_parent_class)->dispose (object);
|
G_OBJECT_CLASS (gtk_stack_switcher_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_stack_switcher_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
GtkStackSwitcher *switcher = GTK_STACK_SWITCHER (object);
|
||||||
|
GtkStackSwitcherPrivate *priv;
|
||||||
|
|
||||||
|
priv = gtk_stack_switcher_get_instance_private (switcher);
|
||||||
|
|
||||||
|
g_hash_table_destroy (priv->buttons);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (gtk_stack_switcher_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_stack_switcher_class_init (GtkStackSwitcherClass *class)
|
gtk_stack_switcher_class_init (GtkStackSwitcherClass *class)
|
||||||
{
|
{
|
||||||
@ -486,6 +499,7 @@ gtk_stack_switcher_class_init (GtkStackSwitcherClass *class)
|
|||||||
object_class->get_property = gtk_stack_switcher_get_property;
|
object_class->get_property = gtk_stack_switcher_get_property;
|
||||||
object_class->set_property = gtk_stack_switcher_set_property;
|
object_class->set_property = gtk_stack_switcher_set_property;
|
||||||
object_class->dispose = gtk_stack_switcher_dispose;
|
object_class->dispose = gtk_stack_switcher_dispose;
|
||||||
|
object_class->finalize = gtk_stack_switcher_finalize;
|
||||||
|
|
||||||
g_object_class_install_property (object_class,
|
g_object_class_install_property (object_class,
|
||||||
PROP_STACK,
|
PROP_STACK,
|
||||||
|
Loading…
Reference in New Issue
Block a user