From 57c2428dc0882f56b76590512258ffab8bdfcec6 Mon Sep 17 00:00:00 2001 From: marcelo-schreiber Date: Wed, 1 May 2024 18:43:14 -0300 Subject: [PATCH] Fix memory leak issue in runCode function --- src/routes/run-code.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/routes/run-code.ts b/src/routes/run-code.ts index 1ec7fe4..b9994e1 100644 --- a/src/routes/run-code.ts +++ b/src/routes/run-code.ts @@ -89,6 +89,7 @@ export async function runCode(request: Request, response: Response) { } finally { try { // prevent memory leaks + await container.kill(); await container.stop(); await container.remove(); } catch (e) {}