diff options
Diffstat (limited to 'git.go')
| -rw-r--r-- | git.go | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -139,6 +139,16 @@ func init() { C.git_openssl_set_locking() } +// Shutdown frees all the resources acquired by libgit2. Make sure no +// references to any git2go objects are live before calling this. +// After this is called, invoking any function from this library will result in +// undefined behavior, so make sure this is called carefully. +func Shutdown() { + pointerHandles.Clear() + + C.git_libgit2_shutdown() +} + // Oid represents the id for a Git object. type Oid [20]byte |
