-
Notifications
You must be signed in to change notification settings - Fork 61
Redrawing tiles seems to cause memory leak (PIXI 8) #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Looks like a bug, but where... |
Curious too. I created a small Test project eliminating as much of my code as possible. It just draws 100x100 tiles of grass 60 times per second. 100x100 to see the memory leaking effect in a reasonable time (usually around 1-3 minutes), it behaves the same with fewer tiles, it just takes longer. The main_test.js looks like this:
I have built and attached that project in case you want to test it. It should run on a a simple python http server or similar.: So yeah it seems like |
Redrawing the tilemap this way (see code below) causes an exponential increase in memory usage, in the first minute unnoticeable but spiking till failure after about 2 minutes when running at 60 FPS. Neither
tilemap.clear()
nortilemap.removeChildren()
prevents this from happening, some data seems to not be cleared while continuing to build up. What would be the 'correct' way of clearing the tilemap in order to redraw it?Using the latest release of tilemap (v5.0.1)
The text was updated successfully, but these errors were encountered: