Fix various TMTag leaks
This commit is contained in:
parent
fbce364182
commit
e409b70fab
@ -605,6 +605,9 @@ static gboolean remove_page(guint page_num)
|
|||||||
g_free(doc->real_path);
|
g_free(doc->real_path);
|
||||||
tm_workspace_remove_object(doc->tm_file, TRUE, TRUE);
|
tm_workspace_remove_object(doc->tm_file, TRUE, TRUE);
|
||||||
|
|
||||||
|
if (doc->priv->tag_tree)
|
||||||
|
gtk_widget_destroy(doc->priv->tag_tree);
|
||||||
|
|
||||||
editor_destroy(doc->editor);
|
editor_destroy(doc->editor);
|
||||||
doc->editor = NULL; /* needs to be NULL for document_undo_clear() call below */
|
doc->editor = NULL; /* needs to be NULL for document_undo_clear() call below */
|
||||||
|
|
||||||
|
@ -1525,6 +1525,7 @@ static void update_tree_tags(GeanyDocument *doc, GList **tags)
|
|||||||
delta = d;
|
delta = d;
|
||||||
parent_search = node->data;
|
parent_search = node->data;
|
||||||
}
|
}
|
||||||
|
tm_tag_unref(parent_tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2300,7 +2301,7 @@ static void on_find_usage(GtkWidget *widget, gboolean in_session)
|
|||||||
GtkTreeSelection *selection;
|
GtkTreeSelection *selection;
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GeanyDocument *doc;
|
GeanyDocument *doc;
|
||||||
const TMTag *tag = NULL;
|
TMTag *tag = NULL;
|
||||||
|
|
||||||
doc = document_get_current();
|
doc = document_get_current();
|
||||||
if (!doc)
|
if (!doc)
|
||||||
@ -2310,7 +2311,10 @@ static void on_find_usage(GtkWidget *widget, gboolean in_session)
|
|||||||
if (gtk_tree_selection_get_selected(selection, &model, &iter))
|
if (gtk_tree_selection_get_selected(selection, &model, &iter))
|
||||||
gtk_tree_model_get(model, &iter, SYMBOLS_COLUMN_TAG, &tag, -1);
|
gtk_tree_model_get(model, &iter, SYMBOLS_COLUMN_TAG, &tag, -1);
|
||||||
if (tag)
|
if (tag)
|
||||||
|
{
|
||||||
search_find_usage(tag->name, tag->name, SCFIND_WHOLEWORD | SCFIND_MATCHCASE, in_session);
|
search_find_usage(tag->name, tag->name, SCFIND_WHOLEWORD | SCFIND_MATCHCASE, in_session);
|
||||||
|
tm_tag_unref(tag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user