IMO Espruino could do significantly better. If we added a Function.prototype.bind function you could skip defining the function inside start() and that'd save you a lot of memory.
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.
Hi. You can basically ignore 'history' now - process.usage is all you need.
If you look at trace, each blinker is allocating:
So each new Blinker is a total of 36 blocks = 720 bytes.
When you use require, you could try calling http://www.espruino.com/Reference#l_ModuÂles_removeAllCached after instantiating all Blinkers? That'll probably free the cached module.
IMO Espruino could do significantly better. If we added a Function.prototype.bind function you could skip defining the function inside
start()
and that'd save you a lot of memory.