itsmichaelhagen / Baseball-Game-Simulator

A simulation of an entire baseball game, from start to finish. Based off of MLB league averages pulled from websites like FanGraphs and BaseballSavant.
http://www.ballclubempire.com/
1 stars 0 forks source link

Memory Leak #1

Open itsmichaelhagen opened 3 months ago

itsmichaelhagen commented 3 months ago

There's a memory leak somewhere, but I am having a lot of trouble pinpointing the issue and fixing it. My suspicion is that it is one of the setTimeout() functions that I have. This simulation requires a lot of setIntervals and setTimeouts to make the game flow properly.

itsmichaelhagen commented 3 months ago

This issue is most likely from a large number of variables in the global scope. The next step will be to consolidate these variables into local scopes.