Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbfae362

Browse files
authored
Merge pull request#686 from jeblair/issue-605
Only gc.collect() under windows
2 parents4dd14b6 +454feda commitbfae362

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎git/repo/base.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,17 @@ def __del__(self):
209209
defclose(self):
210210
ifself.git:
211211
self.git.clear_cache()
212-
gc.collect()
212+
# 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+
ifis_win:
219+
gc.collect()
213220
gitdb.util.mman.collect()
214-
gc.collect()
221+
ifis_win:
222+
gc.collect()
215223

216224
def__eq__(self,rhs):
217225
ifisinstance(rhs,Repo):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp