I use the setTimeout() function through my application but when its time to garbage collect. the method still runs and calls on a function. How do I stop it from calling on a certain function. I tried setting it to null but it doesnt work
setTimeout returns an reference to the timeout, which you can then use when you call clearTimeout.
var myTimeout = setTimeout(...);
clearTimeout(myTimeout);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With