stackswitcher: do not leak buttons hash table

This commit is contained in:
Paolo Borelli 2014-03-29 23:14:51 +01:00
parent 7ac684e9e3
commit 63b90bb5b8

View File

@ -478,6 +478,19 @@ gtk_stack_switcher_dispose (GObject *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
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->set_property = gtk_stack_switcher_set_property;
object_class->dispose = gtk_stack_switcher_dispose;
object_class->finalize = gtk_stack_switcher_finalize;
g_object_class_install_property (object_class,
PROP_STACK,