diff options
Diffstat (limited to 'include/git2/tree.h')
-rw-r--r-- | include/git2/tree.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/git2/tree.h b/include/git2/tree.h index ec2b51646..cb959a790 100644 --- a/include/git2/tree.h +++ b/include/git2/tree.h @@ -53,6 +53,24 @@ GIT_INLINE(int) git_tree_lookup(git_tree **tree, git_repository *repo, const git } /** + * Close an open tree + * + * This is a wrapper around git_object_close() + * + * IMPORTANT: + * It *is* necessary to call this method when you stop + * using a tree. Failure to do so will cause a memory leak. + * + * @param tree the tree to close + */ + +GIT_INLINE(void) git_tree_close(git_tree *tree) +{ + return git_object_close((git_object *) tree); +} + + +/** * Get the id of a tree. * * @param tree a previously loaded tree. |