aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-02-21 21:43:41 +0800
committerMilan Crha <mcrha@redhat.com>2014-02-21 21:43:41 +0800
commit1ea0e626cb9306f9ec2204e1e0adb86ec86e692f (patch)
tree738eaa17644cd4ffc9e5b604a1dbe5c7dfd08ff3 /e-util
parentc287f194e1fbebc5d85984ac52a7ac4a0a398550 (diff)
downloadgsoc2013-evolution-1ea0e626cb9306f9ec2204e1e0adb86ec86e692f.tar.gz
gsoc2013-evolution-1ea0e626cb9306f9ec2204e1e0adb86ec86e692f.tar.zst
gsoc2013-evolution-1ea0e626cb9306f9ec2204e1e0adb86ec86e692f.zip
Fix few more memory leaks
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-name-selector-list.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/e-util/e-name-selector-list.c b/e-util/e-name-selector-list.c
index 19c20ed127..f2d2a064bc 100644
--- a/e-util/e-name-selector-list.c
+++ b/e-util/e-name-selector-list.c
@@ -674,12 +674,32 @@ name_selector_list_realize (GtkWidget *widget)
}
static void
+name_selector_list_dispose (GObject *object)
+{
+ ENameSelectorList *list;
+
+ list = E_NAME_SELECTOR_LIST (object);
+
+ if (list->priv->popup) {
+ gtk_widget_destroy (GTK_WIDGET (list->priv->popup));
+ list->priv->popup = NULL;
+ }
+
+ /* Chain up to parent's method. */
+ G_OBJECT_CLASS (e_name_selector_list_parent_class)->dispose (object);
+}
+
+static void
e_name_selector_list_class_init (ENameSelectorListClass *class)
{
+ GObjectClass *object_class;
GtkWidgetClass *widget_class;
g_type_class_add_private (class, sizeof (ENameSelectorListPrivate));
+ object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = name_selector_list_dispose;
+
widget_class = GTK_WIDGET_CLASS (class);
widget_class->realize = name_selector_list_realize;
}