summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-02-28 16:51:17 +0200
committerVicent Marti <tanoku@gmail.com>2011-03-03 20:23:52 +0200
commit48c27f86bbe9678c7e01a90a2cec7a30327b0e90 (patch)
tree0156ea823de82477792ad4778378200eee28aee3 /tests
parent86d7e1ca6f54161a9e4d1ebe7a2f8e4802dc9639 (diff)
downloadlibgit2-48c27f86bbe9678c7e01a90a2cec7a30327b0e90.tar.gz
Implement reference counting for git_objects
All `git_object` instances looked up from the repository are reference counted. User is expected to use the new `git_object_close` when an object is no longer needed to force freeing it. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/t09-tree.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/t09-tree.c b/tests/t09-tree.c
index cb127556b..6bc2a84bd 100644
--- a/tests/t09-tree.c
+++ b/tests/t09-tree.c
@@ -101,8 +101,6 @@ BEGIN_TEST(write0, "add a new entry to a tree and write it back to disk")
must_pass(git_object_write((git_object *)tree));
must_pass(remove_loose_object(REPOSITORY_FOLDER, (git_object *)tree));
- git_object_free((git_object *)tree);
-
git_repository_free(repo);
END_TEST
@@ -152,7 +150,6 @@ BEGIN_TEST(write1, "add several entries in-memory and validate that they exist;
*/
must_pass(remove_loose_object(REPOSITORY_FOLDER, (git_object *)tree));
- git_object_free((git_object *)tree);
git_repository_free(repo);
END_TEST