Yes, you can do that - but it won't save you a great deal of memory (only a few variables)...
While the TRILED object reference will be deleted, the object itself will still hang around because it's used by L1,L2,etc.
TRILED
L1
L2
You can check how much memory you are using before and after the delete using process.memory().usage
process.memory().usage
@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.
Yes, you can do that - but it won't save you a great deal of memory (only a few variables)...
While the
TRILED
object reference will be deleted, the object itself will still hang around because it's used byL1
,L2
,etc.You can check how much memory you are using before and after the delete using
process.memory().usage