Revision: 3056 http://geany.svn.sourceforge.net/geany/?rev=3056&view=rev Author: eht16 Date: 2008-10-07 18:51:50 +0000 (Tue, 07 Oct 2008)
Log Message: ----------- Plug some memory leaks due to some missing g_object_unref's.
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/filebrowser.c trunk/plugins/htmlchars.c trunk/src/msgwindow.c trunk/src/plugins.c trunk/src/prefs.c trunk/src/treeviews.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-10-07 17:31:17 UTC (rev 3055) +++ trunk/ChangeLog 2008-10-07 18:51:50 UTC (rev 3056) @@ -1,3 +1,10 @@ +2008-10-07 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * plugins/filebrowser.c, plugins/htmlchars.c, src/editor.c, + src/msgwindow.c, src/plugins.c, src/prefs.c, src/treeviews.c: + Plug some memory leaks due to some missing g_object_unref's. + + 2008-10-07 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* plugins/splitwindow.c:
Modified: trunk/plugins/filebrowser.c =================================================================== --- trunk/plugins/filebrowser.c 2008-10-07 17:31:17 UTC (rev 3055) +++ trunk/plugins/filebrowser.c 2008-10-07 18:51:50 UTC (rev 3056) @@ -687,6 +687,7 @@ file_store = gtk_list_store_new(FILEVIEW_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
gtk_tree_view_set_model(GTK_TREE_VIEW(file_view), GTK_TREE_MODEL(file_store)); + g_object_unref(file_store);
icon_renderer = gtk_cell_renderer_pixbuf_new(); text_renderer = gtk_cell_renderer_text_new();
Modified: trunk/plugins/htmlchars.c =================================================================== --- trunk/plugins/htmlchars.c 2008-10-07 17:31:17 UTC (rev 3055) +++ trunk/plugins/htmlchars.c 2008-10-07 18:51:50 UTC (rev 3056) @@ -107,6 +107,7 @@ sc_store = gtk_tree_store_new(N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(sc_tree), GTK_TREE_MODEL(sc_store)); + g_object_unref(sc_store);
renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(
Modified: trunk/src/msgwindow.c =================================================================== --- trunk/src/msgwindow.c 2008-10-07 17:31:17 UTC (rev 3055) +++ trunk/src/msgwindow.c 2008-10-07 18:51:50 UTC (rev 3056) @@ -108,6 +108,7 @@
msgwindow.store_status = gtk_list_store_new(1, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(msgwindow.tree_status), GTK_TREE_MODEL(msgwindow.store_status)); + g_object_unref(msgwindow.store_status);
renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Status messages"), renderer, "text", 0, NULL); @@ -137,6 +138,7 @@ msgwindow.store_msg = gtk_list_store_new(4, G_TYPE_INT, G_TYPE_POINTER, GDK_TYPE_COLOR, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(msgwindow.tree_msg), GTK_TREE_MODEL(msgwindow.store_msg)); + g_object_unref(msgwindow.store_msg);
renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(NULL, renderer, @@ -171,6 +173,7 @@
msgwindow.store_compiler = gtk_list_store_new(2, GDK_TYPE_COLOR, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(msgwindow.tree_compiler), GTK_TREE_MODEL(msgwindow.store_compiler)); + g_object_unref(msgwindow.store_compiler);
renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(NULL, renderer, "foreground-gdk", 0, "text", 1, NULL);
Modified: trunk/src/plugins.c =================================================================== --- trunk/src/plugins.c 2008-10-07 17:31:17 UTC (rev 3055) +++ trunk/src/plugins.c 2008-10-07 18:51:50 UTC (rev 3056) @@ -1046,6 +1046,7 @@ } } gtk_tree_view_set_model(GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + g_object_unref(store); }
Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2008-10-07 17:31:17 UTC (rev 3055) +++ trunk/src/prefs.c 2008-10-07 18:51:50 UTC (rev 3056) @@ -272,6 +272,7 @@
store = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); gtk_tree_view_set_model(GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + g_object_unref(store);
renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Action"), renderer, "text", KB_TREE_ACTION, NULL);
Modified: trunk/src/treeviews.c =================================================================== --- trunk/src/treeviews.c 2008-10-07 17:31:17 UTC (rev 3055) +++ trunk/src/treeviews.c 2008-10-07 18:51:50 UTC (rev 3056) @@ -119,6 +119,8 @@ pango_font_description_free(pfd);
gtk_tree_view_set_model(GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store)); + g_object_unref(store); + g_signal_connect(tree, "button-press-event", G_CALLBACK(on_treeviews_button_press_event), GINT_TO_POINTER(TREEVIEW_SYMBOL)); g_signal_connect(tree, "key-press-event", @@ -254,6 +256,7 @@ store_openfiles = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_POINTER, GDK_TYPE_COLOR); #endif gtk_tree_view_set_model(GTK_TREE_VIEW(tv.tree_openfiles), GTK_TREE_MODEL(store_openfiles)); + g_object_unref(store_openfiles);
/* set policy settings for the scolledwindow around the treeview again, because glade * doesn't keep the settings */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.