Generally clock faces load big fonts which aren't used by anything else, so deleting them isn't a big deal.
However, when something uses a module, generally we don't try and remove the module from memory - and FontVGA8 is a module (require("FontVGA8").add(Graphics);).
I think in this case I'd just not delete the font from memory - in the scheme of things it's not going to be using huge amounts of RAM. As mentioned it might be an issue on Bangle.js 1 where memory is tight, but realistically you're probably not developing your app to run on that anyway.
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.
Yes, that's a tricky one.
Generally clock faces load big fonts which aren't used by anything else, so deleting them isn't a big deal.
However, when something uses a module, generally we don't try and remove the module from memory - and FontVGA8 is a module (
require("FontVGA8").add(Graphics);
).I think in this case I'd just not delete the font from memory - in the scheme of things it's not going to be using huge amounts of RAM. As mentioned it might be an issue on Bangle.js 1 where memory is tight, but realistically you're probably not developing your app to run on that anyway.