Tatwi / RocketTux

A Tux themed side scrolling coin collection game with player-influenced random level generation.
GNU General Public License v3.0
2 stars 0 forks source link

Memory Leak - Playing new levels slowly eats up RAM #2

Closed Tatwi closed 3 years ago

Tatwi commented 6 years ago

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 3 years ago

Resolved by removing SlickUI in commits: 390b78c202b3efc8b038293a39e1599f83f36e9b f6f05c1a80dcccc3aef02764ce5cf3958ef43b2b

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).