summaryrefslogtreecommitdiff
path: root/git/repo/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/repo/base.py')
-rw-r--r--git/repo/base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/git/repo/base.py b/git/repo/base.py
index e8db3540..934a6f03 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -168,6 +168,10 @@ class Repo(object):
args.append(self.git)
self.odb = odbt(*args)
+ def __del__(self):
+ if self.git:
+ self.git.clear_cache()
+
def __eq__(self, rhs):
if isinstance(rhs, Repo):
return self.git_dir == rhs.git_dir