Gridlock (www.newgrounds.com/portal/view/840594) starts to accumulate lag on mobile phones after passing through a few levels. The game slows down significantly on my Android phone if I keep loading new levels. At first I thought there is ActionScript memory leak, but after profiling the SWF with Adobe Scout, it turned out the lag is most likely caused by the emulator. It must be something with the creation and destroying of Car objects for each new level loaded. If more information is needed I can assist or provide source code so we can determine what is causing the problem.
Describe the bug
Gridlock (www.newgrounds.com/portal/view/840594) starts to accumulate lag on mobile phones after passing through a few levels. The game slows down significantly on my Android phone if I keep loading new levels. At first I thought there is ActionScript memory leak, but after profiling the SWF with Adobe Scout, it turned out the lag is most likely caused by the emulator. It must be something with the creation and destroying of Car objects for each new level loaded. If more information is needed I can assist or provide source code so we can determine what is causing the problem.
Expected behavior
The game should not accumulate lag.
Affected platform
Self-hosted version
Operating system
Android version 9 (VTR-L09), EMUI 9.1.0.275
Browser
Chrome 102.0.5005.125
Additional information
No response