We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4dd14b6 + 454feda commit bfae362Copy full SHA for bfae362
git/repo/base.py
@@ -209,9 +209,17 @@ def __del__(self):
209
def close(self):
210
if self.git:
211
self.git.clear_cache()
212
- gc.collect()
+ # Tempfiles objects on Windows are holding references to
213
+ # open files until they are collected by the garbage
214
+ # collector, thus preventing deletion.
215
+ # TODO: Find these references and ensure they are closed
216
+ # and deleted synchronously rather than forcing a gc
217
+ # collection.
218
+ if is_win:
219
+ gc.collect()
220
gitdb.util.mman.collect()
221
222
223
224
def __eq__(self, rhs):
225
if isinstance(rhs, Repo):
0 commit comments