Commit 63b90bb5 authored by Paolo Borelli's avatar Paolo Borelli

stackswitcher: do not leak buttons hash table

parent 7ac684e9
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment