summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/concurrent/futures/process.py1
-rw-r--r--Misc/NEWS.d/next/Library/2019-01-11-08-47-58.bpo-35715.Wi3gl0.rst1
2 files changed, 2 insertions, 0 deletions
diff --git a/Lib/concurrent/futures/process.py b/Lib/concurrent/futures/process.py
index ce7d642..9b85e7f 100644
--- a/Lib/concurrent/futures/process.py
+++ b/Lib/concurrent/futures/process.py
@@ -235,6 +235,7 @@ def _process_worker(call_queue, result_queue, initializer, initargs):
_sendback_result(result_queue, call_item.work_id, exception=exc)
else:
_sendback_result(result_queue, call_item.work_id, result=r)
+ del r
# Liberate the resource as soon as possible, to avoid holding onto
# open files or shared memory that is not needed anymore
diff --git a/Misc/NEWS.d/next/Library/2019-01-11-08-47-58.bpo-35715.Wi3gl0.rst b/Misc/NEWS.d/next/Library/2019-01-11-08-47-58.bpo-35715.Wi3gl0.rst
new file mode 100644
index 0000000..0c1ec6b
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-01-11-08-47-58.bpo-35715.Wi3gl0.rst
@@ -0,0 +1 @@
+Librates the return value of a ProcessPoolExecutor _process_worker after it's no longer needed to free memory \ No newline at end of file