[gedit] tab: remove timeouts and idles in dispose(), not finalize()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] tab: remove timeouts and idles in dispose(), not finalize()
- Date: Wed, 24 Jun 2015 12:23:47 +0000 (UTC)
commit c176b1fe21048f7f13e1652bb9e0110ba0316015
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Jun 24 14:20:42 2015 +0200
tab: remove timeouts and idles in dispose(), not finalize()
It's better in dispose(), because after the first dispose() the object
can no longer run correctly anyway (it can lead to critical messages
etc, I guess).
It also simplifies the code since the finalize() can be removed
altogether.
gedit/gedit-tab.c | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index eacd521..d2aa993 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -325,14 +325,6 @@ gedit_tab_dispose (GObject *object)
g_clear_object (&tab->print_job);
g_clear_object (&tab->print_preview);
- G_OBJECT_CLASS (gedit_tab_parent_class)->dispose (object);
-}
-
-static void
-gedit_tab_finalize (GObject *object)
-{
- GeditTab *tab = GEDIT_TAB (object);
-
remove_auto_save_timeout (tab);
if (tab->idle_scroll != 0)
@@ -341,7 +333,7 @@ gedit_tab_finalize (GObject *object)
tab->idle_scroll = 0;
}
- G_OBJECT_CLASS (gedit_tab_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gedit_tab_parent_class)->dispose (object);
}
static void
@@ -376,7 +368,6 @@ gedit_tab_class_init (GeditTabClass *klass)
GtkWidgetClass *gtkwidget_class = GTK_WIDGET_CLASS (klass);
object_class->dispose = gedit_tab_dispose;
- object_class->finalize = gedit_tab_finalize;
object_class->get_property = gedit_tab_get_property;
object_class->set_property = gedit_tab_set_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]