Commit 54f0b0a2 authored by Johannes Schmid's avatar Johannes Schmid Committed by Johannes Schmid

Fixed some memory leaks

2007-08-31  Johannes Schmid <jhs@gnome.org>

	* libanjuta/anjuta-plugin-manager.c: (anjuta_plugin_manager_new):
	* libanjuta/anjuta-ui.c: (anjuta_ui_add_action_group):
	
	Fixed some memory leaks
	
	* MAINTAINERS: Fixed

svn path=/trunk/; revision=3083
parent b3149b03
2007-08-31 Johannes Schmid <jhs@gnome.org>
* libanjuta/anjuta-plugin-manager.c: (anjuta_plugin_manager_new):
* libanjuta/anjuta-ui.c: (anjuta_ui_add_action_group):
Fixed some memory leaks
* MAINTAINERS: Fixed
2007-08-31 Johannes Schmid <jhs@gnome.org> 2007-08-31 Johannes Schmid <jhs@gnome.org>
* libanjuta/anjuta-preferences.c: (get_object_type_from_string), * libanjuta/anjuta-preferences.c: (get_object_type_from_string),
......
Naba Kumar <naba@gnome.org> Naba Kumar
E-Mail: naba@gnome.org
Userid: naba
...@@ -2333,6 +2333,8 @@ anjuta_plugin_manager_new (GObject *shell, AnjutaStatus *status, ...@@ -2333,6 +2333,8 @@ anjuta_plugin_manager_new (GObject *shell, AnjutaStatus *status,
node = g_list_next (node); node = g_list_next (node);
} }
resolve_dependencies (plugin_manager, &cycles); resolve_dependencies (plugin_manager, &cycles);
g_list_foreach(plugin_dirs, (GFunc) g_free, NULL);
g_list_free(plugin_dirs);
return plugin_manager; return plugin_manager;
} }
......
...@@ -604,6 +604,7 @@ anjuta_ui_add_action_group (AnjutaUI *ui, ...@@ -604,6 +604,7 @@ anjuta_ui_add_action_group (AnjutaUI *ui,
if (icon) if (icon)
{ {
GtkWidget *dummy = gtk_label_new ("Dummy"); GtkWidget *dummy = gtk_label_new ("Dummy");
g_object_ref_sink(G_OBJECT(dummy));
pixbuf = gtk_widget_render_icon (dummy, icon, pixbuf = gtk_widget_render_icon (dummy, icon,
GTK_ICON_SIZE_MENU, NULL); GTK_ICON_SIZE_MENU, NULL);
gtk_tree_store_set (GTK_TREE_STORE (ui->priv->model), &iter, gtk_tree_store_set (GTK_TREE_STORE (ui->priv->model), &iter,
...@@ -615,7 +616,7 @@ anjuta_ui_add_action_group (AnjutaUI *ui, ...@@ -615,7 +616,7 @@ anjuta_ui_add_action_group (AnjutaUI *ui,
COLUMN_GROUP, action_group_name, COLUMN_GROUP, action_group_name,
-1); -1);
g_object_unref (G_OBJECT (pixbuf)); g_object_unref (G_OBJECT (pixbuf));
gtk_widget_destroy (dummy); g_object_unref (dummy);
g_free (icon); g_free (icon);
} }
else else
...@@ -631,6 +632,8 @@ anjuta_ui_add_action_group (AnjutaUI *ui, ...@@ -631,6 +632,8 @@ anjuta_ui_add_action_group (AnjutaUI *ui,
g_free (action_label); g_free (action_label);
} }
g_list_free(actions);
/* If there are no actions in the group, removed the group node */ /* If there are no actions in the group, removed the group node */
if (n_actions_added == 0) if (n_actions_added == 0)
gtk_tree_store_remove (GTK_TREE_STORE (ui->priv->model), gtk_tree_store_remove (GTK_TREE_STORE (ui->priv->model),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment