Open dsherret opened 5 months ago
Is this why creating new JsRuntimes leaks memory? Is there a solution to this? Here's a simple example that steadily increases memory usage over time.
use deno_core::{JsRuntime, RuntimeOptions};
fn main() {
for i in 0..1000 {
let _js_runtime = JsRuntime::new(RuntimeOptions {
..Default::default()
});
}
}
Run and close a worker in a loop and you'll see this happening.
https://github.com/v8/v8/blob/cbc1b57b90ba1db080f0a045adcefce04c1f21e5/src/snapshot/code-serializer.cc#L669