From b7abf4fa07849646cfc085364a5b743e56e9ffc4 Mon Sep 17 00:00:00 2001 From: Jake Hillion Date: Sat, 21 May 2022 16:40:03 +0100 Subject: [PATCH] removed incorrect closure drop --- src/void.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/void.rs b/src/void.rs index 3b575bc..bab1dda 100644 --- a/src/void.rs +++ b/src/void.rs @@ -135,14 +135,6 @@ impl VoidBuilder { } debug!("cloned child: {}", child); - - // Leak the child function's resources in the parent process. - // This avoids closing files that have been "moved" into the child. - // It is also an over-approximation, and may cause actual memory leaks. - // As the spawning process is normally short lived, this shouldn't - // be a problem. - std::mem::forget(child_fn); - Ok(VoidHandle { pid: child }) }