File tree 1 file changed +6
-8
lines changed
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -356,14 +356,12 @@ where
356
356
/// lifetime dynamically managed by the JS GC. This function can be used
357
357
/// to drop this `Closure` while keeping the associated JS function still
358
358
/// valid.
359
- ///
360
- /// By default this function will leak memory. This can be dangerous if this
361
- /// function is called many times in an application because the memory leak
362
- /// will overwhelm the page quickly and crash the wasm.
363
- ///
364
- /// If the browser, however, supports weak references, then this function
365
- /// will not leak memory. Instead the Rust memory will be reclaimed when the
366
- /// JS closure is GC'd.
359
+ ///
360
+ /// If the platform supports weak references, the Rust memory will be
361
+ /// reclaimed when the JS closure is GC'd. If weak references is not
362
+ /// supported, this can be dangerous if this function is called many times
363
+ /// in an application because the memory leak will overwhelm the page
364
+ /// quickly and crash the wasm.
367
365
pub fn into_js_value ( self ) -> JsValue {
368
366
let idx = self . js . idx ;
369
367
mem:: forget ( self ) ;
You can’t perform that action at this time.
0 commit comments