gloo
gloo copied to clipboard
Question about gloo_timers::callback::Timeout
The example shown at https://docs.rs/gloo-timers/0.3.0/gloo_timers/#timeouts-with-a-callback-function indicates it's okay to forget a timeout if you don't intend to cancel it. I see that Timeout uses Closure::once. Docs on Closure::once indicate that it enforces at runtime that it is only called on time but I didn't see anything indicating if resources associated to the closure are automatically cleaned up (as opposed to being leaked) after it has run.
Will repeatedly calling Timeout::new(...).forget() leak resources?