What Kind of Code Can Cause a Memory Leak?

Hey folks…

My PHP based web app has developed a memory leak. Normally the memory use is stable at around 200Mb, but there is something I added to front end in the last month which is causing the memory usage in Chrome to sometimes increase by 200Mb per minute, even when the app is just sitting static in a tab not being used.

There is no network activity going on, it is purely happening within the front end.

While I spend a few minutes writing this in another browser it has gone from 500Mb to 2Gb… :flushed:

I’d love any pointers as to what kind of code structure to be looking for!

Many thanks,
Antony.

PS - the app is based on Wappler 3.9.7… stability city!

I use mostly the DevTools Performance tab for debugging problems in the front-end. With it you can which JavaScript is running and when memory increases. Also the Memory tab is useful to take a snapshot of the objects that are in memory.

[Debugging JavaScript Memory Leaks | DebugBear](https://www.debugbear.com/blog/debugging-javascript-memory-leaks

1 Like

Thanks for that @patrick - I’ve had a quick go but need time to interpret the results.

Are there particular Wappler contructs which are notorious for creating memory leaks? :thinking: