anjuta r3658 - in trunk: . plugins/macro plugins/symbol-browser



Author: jhs
Date: Thu Feb 14 09:56:38 2008
New Revision: 3658
URL: http://svn.gnome.org/viewvc/anjuta?rev=3658&view=rev

Log:
2008-02-14  Johannes Schmid <jhs gnome org>

	* plugins/macro/macro-db.c: (save_macro), (macro_db_get_macro):
	* plugins/macro/macro-dialog.c: (on_macro_selection_changed):
	* plugins/symbol-browser/an_symbol.c:
	* plugins/symbol-browser/an_symbol_view.c:
	(on_symbol_view_row_expanded):
	Fixed some memory leaks (Remember to all free/unref everything that comes
	from gtk_tree_model_get())

Modified:
   trunk/ChangeLog
   trunk/plugins/macro/macro-db.c
   trunk/plugins/macro/macro-dialog.c
   trunk/plugins/symbol-browser/an_symbol.c
   trunk/plugins/symbol-browser/an_symbol_view.c

Modified: trunk/plugins/macro/macro-db.c
==============================================================================
--- trunk/plugins/macro/macro-db.c	(original)
+++ trunk/plugins/macro/macro-db.c	Thu Feb 14 09:56:38 2008
@@ -204,6 +204,9 @@
 	bytes = strlen (output);
 	result = gnome_vfs_write (handle, output,
 				  strlen (output), &bytes_written);
+	g_free (name);
+	g_free (category);
+	g_free (text);
 	if (result != GNOME_VFS_OK)
 		return;
 }
@@ -427,6 +430,7 @@
 	else
 	{
 		gchar* buffer = expand_macro(plugin, text, offset);
+		g_free (text);
 		return buffer;
 	}
 }

Modified: trunk/plugins/macro/macro-dialog.c
==============================================================================
--- trunk/plugins/macro/macro-dialog.c	(original)
+++ trunk/plugins/macro/macro-dialog.c	Thu Feb 14 09:56:38 2008
@@ -154,6 +154,7 @@
 
 				gtk_widget_set_sensitive (edit, !predefined);
 				gtk_widget_set_sensitive (remove, !predefined);
+				g_free (text);
 				return;
 			}
 		}

Modified: trunk/plugins/symbol-browser/an_symbol.c
==============================================================================
--- trunk/plugins/symbol-browser/an_symbol.c	(original)
+++ trunk/plugins/symbol-browser/an_symbol.c	Thu Feb 14 09:56:38 2008
@@ -19,6 +19,7 @@
  */
 
 #include <libgnome/gnome-macros.h>
+#include <libgnomevfs/gnome-vfs-utils.h>
 #include <libanjuta/anjuta-utils.h>
 #include <libanjuta/anjuta-debug.h>
 #include <libanjuta/interfaces/ianjuta-symbol.h>

Modified: trunk/plugins/symbol-browser/an_symbol_view.c
==============================================================================
--- trunk/plugins/symbol-browser/an_symbol_view.c	(original)
+++ trunk/plugins/symbol-browser/an_symbol_view.c	Thu Feb 14 09:56:38 2008
@@ -455,7 +455,10 @@
 							SYMBOL_NODE, &sym, -1);
 		/* Symbol has been created, no need to create them again */
 		if (sym)
+		{
+			g_object_unref (sym);
 			return;
+		}
 	}
 	else 
 	{
@@ -486,6 +489,7 @@
 	if (sym)
 	{
 		anjuta_symbol_view_add_children (sv, sym, store, iter);
+		g_object_unref (sym);
 	}
 
 	/* Delete the referenced rows */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]