libgit2

git_object_free

Version:

Close an open object

This method instructs the library to close an existing object; note that git_objects are owned and cached by the repository so the object may or may not be freed after this library call, depending on how aggressive is the caching mechanism used by the repository.

IMPORTANT: It is necessary to call this method when you stop using an object. Failure to do so will cause a memory leak.

Signature

void git_object_free(git_object *object);

Parameters

In
object

the object to close

Versions