[anjuta] git: fix up memory management of log model
- From: Carl-Anton Ingmarsson <carlantoni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] git: fix up memory management of log model
- Date: Thu, 21 Feb 2013 22:09:42 +0000 (UTC)
commit 9587b7d949f42f8ed9d5911454f328802ec1faeb
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Thu Feb 21 22:59:54 2013 +0100
git: fix up memory management of log model
GitLogPane owns a reference to the log model so it just have to unref it when
it's destroyed.
plugins/git/git-log-pane.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/plugins/git/git-log-pane.c b/plugins/git/git-log-pane.c
index 5f381d9..14a04ed 100644
--- a/plugins/git/git-log-pane.c
+++ b/plugins/git/git-log-pane.c
@@ -319,7 +319,6 @@ on_log_command_finished (AnjutaCommand *command, guint return_code,
0);
gtk_tree_view_set_model (GTK_TREE_VIEW (log_view),
GTK_TREE_MODEL (self->priv->log_model));
- g_object_unref (self->priv->log_model);
g_clear_object (&self->priv->log_command);
}
@@ -341,7 +340,6 @@ refresh_log (GitLogPane *self)
if (self->priv->log_command)
g_object_unref (self->priv->log_command);
- g_object_ref (self->priv->log_model);
gtk_tree_view_set_model (log_view, NULL);
/* We don't support filters for now */
@@ -1018,6 +1016,7 @@ git_log_pane_finalize (GObject *object)
g_source_remove (self->priv->spin_timer_id);
g_object_unref (self->priv->builder);
+ g_object_unref (self->priv->log_model);
g_free (self->priv->path);
g_hash_table_destroy (self->priv->branches_table);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]