| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f237620 commit 454feda
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -209,9 +209,17 @@ def __del__(self): | |||
| 209 | 209 | def close(self): | |
| 210 | 210 | if self.git: | |
| 211 | 211 | 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 | + if is_win: | ||
| 219 | + gc.collect() | ||
| 213 | 220 | gitdb.util.mman.collect() | |
| 214 | - gc.collect() | ||
| 221 | + if is_win: | ||
| 222 | + gc.collect() | ||
| 215 | 223 | ||
| 216 | 224 | def __eq__(self, rhs): | |
| 217 | 225 | if isinstance(rhs, Repo): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments