summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-10-31 10:56:18 -0700
committerShawn O. Pearce <spearce@spearce.org>2008-10-31 11:05:05 -0700
commit111d5ccf0bb010c4e8d7af3eedfa12ef4c5e265b (patch)
tree50330c02bd4fd95c9db1fcf2f97f4218e42b7226 /src
parentb51eb250ed0cbda59d3108d04569fab9413909fd (diff)
downloadlibgit2-111d5ccf0bb010c4e8d7af3eedfa12ef4c5e265b.tar.gz
Add a git_sobj_close to release the git_sobj data
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'src')
-rw-r--r--src/git_odb.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/git_odb.h b/src/git_odb.h
index e815adf58..b74eefdaa 100644
--- a/src/git_odb.h
+++ b/src/git_odb.h
@@ -140,6 +140,17 @@ GIT_EXTERN(git_result) git_odb__read_packed(git_sobj *out, git_odb *db, const gi
*/
GIT_EXTERN(git_result) git_odb__read_loose(git_sobj *out, git_odb *db, const git_oid *id);
+/**
+ * Release all memory used by the sobj structure.
+ *
+ * As a result of this call, obj->data will be set to NULL.
+ *
+ * If obj->data is already NULL, nothing happens.
+ *
+ * @param obj object descriptor to free.
+ */
+GIT_EXTERN(void) git_sobj_close(git_sobj *obj);
+
/** @} */
GIT_END_DECL
#endif