]> Pileus Git - ~andy/gtk/commitdiff
Fix some memory leaks in treemodel unit tests
authorKristian Rietveld <kris@gtk.org>
Sat, 20 Aug 2011 19:51:14 +0000 (21:51 +0200)
committerKristian Rietveld <kris@gtk.org>
Mon, 22 Aug 2011 19:30:35 +0000 (21:30 +0200)
gtk/tests/filtermodel.c
gtk/tests/sortmodel.c
gtk/tests/treestore.c

index 98bce83e93ad6181e3275d02565af598c3aaa350..7186070ac74e6c04478bfac20cc3020fd88fe01c 100644 (file)
@@ -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);
index cec46b5020785874aded12f62ed1b1a7454c7469..a58359d6d115192bfd99fd37e2bbc254aff1ae9a 100644 (file)
@@ -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
index 6d1872da78075a498f2114c2cbadd722f7d574ed..9d0c4c3d4e8c02e0fede9df868c8ba92c3dfd46b 100644 (file)
@@ -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);
 }