ProcessPoolExecutor workers will hold the return value of their last task in memory until the next task is received. Since the return value has already been propagated to the parent process's Future (or has been discarded by this point), the object can be safely released.
_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
--- /dev/null
+Librates the return value of a ProcessPoolExecutor _process_worker after it's no longer needed to free memory
\ No newline at end of file