Could be... I wonder if you're keeping a reference to the MQTT connection somewhere? Any reference would mean that all the listeners and everything would be kept around, even after the disconnection?
You could try trace() and see if you could figure out what was referencing your functions? It's a bit cryptic, but if you posted the results here I might be able to help.
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.
Could be... I wonder if you're keeping a reference to the MQTT connection somewhere? Any reference would mean that all the listeners and everything would be kept around, even after the disconnection?
You could try
trace()
and see if you could figure out what was referencing your functions? It's a bit cryptic, but if you posted the results here I might be able to help.