When you say clearTimeout(ledTimer) it should totally remove that timeout and free any memory used by it.
clearTimeout(ledTimer)
Surely the increased memory usage is because there is already a timer allocated, as you hadn't yet freed it with clearTimeout?
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
When you say
clearTimeout(ledTimer)
it should totally remove that timeout and free any memory used by it.Surely the increased memory usage is because there is already a timer allocated, as you hadn't yet freed it with clearTimeout?