Updating branch refs/heads/master
to 0210f46f4a9e604a52bda681c820e66d352303e5 (commit)
from d45ae8eaa022bd99c25c0db5e68594e12b25281d (commit)
commit 0210f46f4a9e604a52bda681c820e66d352303e5
Author: Nick Schermer <[email protected]>
Date: Wed Apr 11 17:41:54 2007 +0000
* mousepad/mousepad-{window,view}.c: Fix some potential leaks, I'm not
really sure, but it doesn't hurt...
(Old svn revision: 25523)
ChangeLog | 4 ++++
mousepad/mousepad-view.c | 13 +++++++++++++
mousepad/mousepad-window.c | 1 +
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 631e00d..e30174d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
2007-04-11 Nick Schermer <[email protected]>
+ * mousepad/mousepad-{window,view}.c: Fix some potential leaks, I'm not
+ really sure, but it doesn't hurt...
+
+2007-04-11 Nick Schermer <[email protected]>
* mousepad/mousepad-statusbar.c: Destroy the tool items together with
the
searchbar (memory leak from valgrind).
diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c
index cc6afd7..5f9fba3 100644
--- a/mousepad/mousepad-view.c
+++ b/mousepad/mousepad-view.c
@@ -33,6 +33,7 @@
static void mousepad_view_class_init (MousepadViewClass
*klass);
+static void mousepad_view_finalize (GObject
*object);
static gboolean mousepad_view_key_press_event (GtkWidget
*widget,
GdkEventKey
*event);
static void mousepad_view_indent_lines (MousepadView *view,
@@ -96,10 +97,14 @@ mousepad_view_get_type (void)
static void
mousepad_view_class_init (MousepadViewClass *klass)
{
+ GObjectClass *gobject_class;
GtkWidgetClass *widget_class;
mousepad_view_parent_class = g_type_class_peek_parent (klass);
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = mousepad_view_finalize;
+
widget_class = GTK_WIDGET_CLASS (klass);
widget_class->key_press_event = mousepad_view_key_press_event;
widget_class->expose_event = mousepad_view_expose;
@@ -107,6 +112,14 @@ mousepad_view_class_init (MousepadViewClass *klass)
+static void
+mousepad_view_finalize (GObject *object)
+{
+ (*G_OBJECT_CLASS (mousepad_view_parent_class)->finalize) (object);
+}
+
+
+
/**
* mousepad_view_key_press_event:
* @widget : A #GtkWidget.
diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c
index 14affd9..15f9f0a 100644
--- a/mousepad/mousepad-window.c
+++ b/mousepad/mousepad-window.c
@@ -550,6 +550,7 @@ mousepad_window_finalize (GObject *object)
g_closure_unref (window->menu_item_selected_closure);
/* release the ui manager */
+ g_signal_handlers_disconnect_matched (G_OBJECT (window->ui_manager),
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, window);
g_object_unref (G_OBJECT (window->ui_manager));
/* release the action groups */
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits