You are reading a single comment by @Robin and its replies.
Click here to read the full conversation.
-
Tue 2021.03.09
Hi Hugh,
Has an attempt to review the amount of 'Free' memory been tracked just after your init() functions to determine whether resources from memory are released after each task?
Maybe try printing inside a setInterval() and monitor?
process.memory(); process.memory().free;
I also noticed the use of timers. Any chance one is still running, say for instance that keeps
creating objects? Snippet below that may be entered into L-Hand WebIDE console to view:console.log(global["\xFF"].timers); //nice, less info trace(global["\xFF"].timers); //full info
I am attempting to build my ultimate multiclock style watch which is a combination of 3 of my clocks, namely "stepo", "waypointer" and "walkers clock". Each uses an arrayBuffer for the display so I need to be careful not to have any memory leaks or bad code.
Each watch face will have an init() function to create any resources and a freeResource() function to set all the variables to undefined.
When switching watch faces...
Everything works fine for the first cycle through the watch faces. But within a few minutes I get a RED MEMORY_LOW warning at the bottom of the watch face. All the individual Apps work without memory problems.
Anyone any suggestions on if the approach should work and whre to look for memory leaks.
Hugh