Tatwi/RocketTux

Memory Leak - Playing new levels slowly eats up RAM

Tatwi opened this issue · 1 comments

Tatwi commented

Each time a level is generated and destroyed, some RAM is not released. I don't know where this issue might be coming from at this time.

Tatwi commented

Resolved by removing SlickUI in commits:
390b78c
f6f05c1

The problem was that none of the objects created by SlickUI were ever removed from RAM, even when explicitly told to remove specific each object individually. This lead to gigabytes worth of memory usage in a matter of a few seconds of starting and exiting levels.

Using the Win64 build of NWjs, the game's memory usage now hovers between 252-300MB, which is pretty much the same as Microsoft Edge and Google Chrome at the New Tab screen.

Side Note: Removing SlickUI also solved the poor performance problems I noticed on the Intel Core2 Quad Q8200 / AMD R9 270 based desktop that my kids use as well as my Intel Celeron N3450 based laptop (both running Win10 64Bit).