Hi guys
I'm currently testing the HTML5 version of my game (on Desktop), and I've noticed that after I cycle through the levels a few times (once I reach level 10, it goes back to 1), all I get is a black screen.
From the warnings the log window is giving me, I'm pretty sure its a memory issue. I have 1 atlas per level, but I wonder whether the memory keeps stacking up instead of getting cleared.
Anybody know what I can do to fix this?
Thank you heaps in advance!!
Comments
There are no problems in the native version, and the memory issues only arise in HTML5 (probably because things are treated / loaded differently).
What would be the easiest way to garbage collect?
I tried putting - collectgarbage() at the start of my level, and before changing to the next scene.
I would get a second opinion incase this is a terrible idea somehow but it works for me
Likes: Ninjadoodle
Also on HTML5 temp files take memory, if you use them be sure to remove created files afterwise.
Likes: SinisterSoft, Ninjadoodle
Likes: Ninjadoodle
https://deluxepixel.com
@billydb and @SinisterSorf - thank you for the tips guys!