[gxml] test/valgrind: change things due to fixes in memory handling
- From: Richard Hans Schwarting <rschwart src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] test/valgrind: change things due to fixes in memory handling
- Date: Fri, 23 Aug 2013 21:01:17 +0000 (UTC)
commit 72093152511ee8d0dc3709d3c768caecf8eaf197
Author: Richard Schwarting <aquarichy gmail com>
Date: Tue Aug 6 23:52:44 2013 +0200
test/valgrind: change things due to fixes in memory handling
test/valgrind/Makefile | 2 +-
test/valgrind/document_create_minimal.c | 4 ----
test/valgrind/document_create_minimal_2.c | 7 ++-----
3 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/test/valgrind/Makefile b/test/valgrind/Makefile
index e80a7ca..cead46c 100644
--- a/test/valgrind/Makefile
+++ b/test/valgrind/Makefile
@@ -33,7 +33,7 @@ supp: *.supp
cat *.supp > ../../gxml.supp
run: all
- G_SLICE=always-malloc valgrind --leak-check=full --show-reachable=yes --suppressions=libxml2.supp
--suppressions=gio.supp --suppressions=gtype.supp --suppressions=glib.supp --num-callers=40
./document_create_minimal_2
+ G_SLICE=always-malloc valgrind --leak-check=full --show-reachable=yes --suppressions=libxml2.supp
--suppressions=gio.supp --suppressions=gtype.supp --suppressions=glib.supp --num-callers=40
./document_create_minimal
run_nosupp:
G_SLICE=always-malloc valgrind --leak-check=full --show-reachable=yes --num-callers=40 ./document
diff --git a/test/valgrind/document_create_minimal.c b/test/valgrind/document_create_minimal.c
index b418320..8b20d3d 100644
--- a/test/valgrind/document_create_minimal.c
+++ b/test/valgrind/document_create_minimal.c
@@ -43,10 +43,6 @@ int main () {
g_free (str);
g_object_unref (doc);
- g_object_unref (root);
- g_object_unref (owner);
- g_object_unref (books);
- g_object_unref (book);
// TODO: how do we clean them up?
diff --git a/test/valgrind/document_create_minimal_2.c b/test/valgrind/document_create_minimal_2.c
index b75f887..fee80a5 100644
--- a/test/valgrind/document_create_minimal_2.c
+++ b/test/valgrind/document_create_minimal_2.c
@@ -23,16 +23,13 @@ int main () {
// Add an owner node
owner = gxml_document_create_element (doc, "Owner");
- g_message ("test: owner refcount %u", G_OBJECT (owner)->ref_count);
gxml_node_append_child (GXML_NODE (root), GXML_NODE (owner));
- g_message ("test: owner refcount %u", G_OBJECT (owner)->ref_count);
- /* gxml_node_append_child (GXML_NODE (root), GXML_NODE (owner)); */
- /* gxml_element_set_attribute (owner, "fullname", "John Green"); */
+ gxml_element_set_attribute (owner, "fullname", "John Green");
/* // TODO: need to figure out what sort of errors these would return, */
/* // want the devhelp pages to describe meaningful possible errors */
/* // Add a collection of books */
- /* books = gxml_document_create_element (doc, "Books"); */
+ books = gxml_document_create_element (doc, "Books");
/* gxml_node_append_child (GXML_NODE (root), GXML_NODE (books)); */
/* for (i = 0; i < sizeof (authors) / sizeof (char*); i++) { */
/* book = gxml_document_create_element (doc, "Book"); */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]