You are reading a single comment by @dwinfiel and its replies.
Click here to read the full conversation.
-
Wed 2019.10.09
Hello @dwinfiel
Would you mind posting the results of
process.env
and separatelyprocess.memory()
before uploading, then again after the memory leak is observed, so that we may get a better understanding of the scope of this issue. Thanks
I'm pretty new to Javascript so I'm hoping this is something that is easy to fix in my code. I've tried setting up my ESP32 to connect to WIFI and MQTT and no matter how I write it, I am getting memory leaks. Luckily, I do not need Bluetooth and I saw on here how to disable that (which practically doubled my available memory).
Below is my current version that will connect to my WIFI and publish MQTT. It will reconnect on a lost WIFI signal or lost MQTT connection. However, every 30 mins or so my free memory drops by 50 or so. I've tried writing this various different ways such as using setInterval vs setTimeout functions. I don't think I am mixing up the scope of any of my global variables. I even once tried putting everything all in one function and periodically resetting it to null which just seemed to make the problem worse. Is there a way to do this that will not run through all the memory?