From 29361f3e694283c6bddddc29e3fee5a57782595d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Cabrera?= Date: Tue, 16 Apr 2024 19:39:15 -0400 Subject: [PATCH] Improve comment for why `ManuallyDrop` --- crates/javy/src/runtime.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/javy/src/runtime.rs b/crates/javy/src/runtime.rs index 522edb0b..5afeeb5f 100644 --- a/crates/javy/src/runtime.rs +++ b/crates/javy/src/runtime.rs @@ -17,7 +17,8 @@ pub struct Runtime { /// The inner QuickJS runtime representation. // We use `ManuallyDrop` to avoid incurring in the cost of dropping the // `rquickjs::Runtime` and its associated objects, which takes a substantial - // time. + // amount of time. + // // This assumes that Javy is used for short-lived programs where the host // will collect the instance's memory when execution ends, making these // drops unnecessary.