[gtk+] Fix some memory leaks in treemodel unit tests
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix some memory leaks in treemodel unit tests
- Date: Mon, 22 Aug 2011 19:44:54 +0000 (UTC)
commit d63015e627e37568aaf925a70611dfc2dfcceba7
Author: Kristian Rietveld <kris gtk org>
Date: Sat Aug 20 21:51:14 2011 +0200
Fix some memory leaks in treemodel unit tests
gtk/tests/filtermodel.c | 1 +
gtk/tests/sortmodel.c | 3 +++
gtk/tests/treestore.c | 1 +
3 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/tests/filtermodel.c b/gtk/tests/filtermodel.c
index 98bce83..7186070 100644
--- a/gtk/tests/filtermodel.c
+++ b/gtk/tests/filtermodel.c
@@ -2913,6 +2913,7 @@ ref_count_delete_row (void)
path = gtk_tree_path_new_from_indices (1, -1);
gtk_tree_view_expand_row (GTK_TREE_VIEW (tree_view), path, TRUE);
+ gtk_tree_path_free (path);
assert_node_ref_count (ref_model, &grandparent1, 2);
assert_node_ref_count (ref_model, &grandparent2, 2);
diff --git a/gtk/tests/sortmodel.c b/gtk/tests/sortmodel.c
index cec46b5..a58359d 100644
--- a/gtk/tests/sortmodel.c
+++ b/gtk/tests/sortmodel.c
@@ -292,6 +292,7 @@ ref_count_delete_row (void)
path = gtk_tree_path_new_from_indices (1, -1);
gtk_tree_view_expand_row (GTK_TREE_VIEW (tree_view), path, TRUE);
+ gtk_tree_path_free (path);
assert_node_ref_count (ref_model, &grandparent1, 1);
assert_node_ref_count (ref_model, &grandparent2, 2);
@@ -1071,6 +1072,8 @@ specific_bug_300089 (void)
/* change the "E" row in a way that causes it to change position */
gtk_tree_model_get_iter (child_model, &iter, path);
gtk_tree_store_set (GTK_TREE_STORE (child_model), &iter, 0, "A", -1);
+
+ gtk_tree_path_free (path);
}
static void
diff --git a/gtk/tests/treestore.c b/gtk/tests/treestore.c
index 6d1872d..9d0c4c3 100644
--- a/gtk/tests/treestore.c
+++ b/gtk/tests/treestore.c
@@ -1028,6 +1028,7 @@ specific_bug_77977 (void)
gtk_tree_store_remove (tree_store, &iter1);
+ gtk_tree_row_reference_free (row_ref);
g_object_unref (tree_store);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]