Skip to content

Commit 26c1a2c

Browse files
authored
Merge pull request #125 from diskoverdata/2.3.1
Update diskover.py mem leak fix
2 parents 5225b1c + 77f0e41 commit 26c1a2c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

diskover/diskover.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ def get_tree_size(executor, thread, root, top, path, sizes, inodes, depth=0, max
606606
dirs += dc
607607
with crawl_thread_lock:
608608
crawl_thread_budget += len(crawl_futures)
609+
del crawl_futures
609610
crawl_futures = []
610611
# if not excluding empty dirs is set or exclude empty dirs is set but there are files or
611612
# dirs in the current directory, index the dir
@@ -788,6 +789,7 @@ def get_tree_size(executor, thread, root, top, path, sizes, inodes, depth=0, max
788789
future.result() # wait for subdir crawl to finish; discard results
789790
with crawl_thread_lock:
790791
crawl_thread_budget += len(crawl_futures)
792+
del crawl_futures
791793

792794
return size, size_du, files, dirs
793795

0 commit comments

Comments
 (0)