No misunderstanding - I think there might be a bug in Espruino - I'll look into it.
If you try a different module it works as I suggested:
>process.memory().usage =17 >g=require("KeyPad") ={ ... } >process.memory().usage =61 >g="" ="" >process.memory().usage =62 >Modules.removeAllCached() =undefined >process.memory().usage =19
@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.
No misunderstanding - I think there might be a bug in Espruino - I'll look into it.
If you try a different module it works as I suggested: