Actually just an update on this - it's not a problem with the interpreter at all.
It's just that on exit Espruino was showing all memory that was left allocated. It should have run a garbage collection pass beforehand, so it could be sure that the stuff it was showing was actually a memory leak, and not just stuff that was left hanging around.
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.
Actually just an update on this - it's not a problem with the interpreter at all.
It's just that on exit Espruino was showing all memory that was left allocated. It should have run a garbage collection pass beforehand, so it could be sure that the stuff it was showing was actually a memory leak, and not just stuff that was left hanging around.