Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't leak canceled timeouts (#2331)
Instead of using `Closure::once_into_js`, this uses `into_js_value`, which uses weak references to clean up the closure when Javascript no longer has need of it. It would be nice to make this (and the similar interval function) drop the callback promptly when cancelled, but I don't think that's possible while keeping the handles Copy. Fixes #2330 Co-authored-by: Robert Macomber <robertm@mox>
- Loading branch information