I'm just trying this here and I don't actually see any increase in usage...
What if you run process.memory().usage? By specifying false as an argument you're telling Espruino not to garbage collect, so the usage will tend to go up over time anyway - but that's not a big deal as when garbage collection runs it goes back down.
If you do just process.memory() then a GC pass is done first, so you're always looking at the amount of memory your code is really using.
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.
I'm just trying this here and I don't actually see any increase in usage...
What if you run
process.memory().usage
? By specifyingfalse
as an argument you're telling Espruino not to garbage collect, so the usage will tend to go up over time anyway - but that's not a big deal as when garbage collection runs it goes back down.If you do just
process.memory()
then a GC pass is done first, so you're always looking at the amount of memory your code is really using.