Hi all. I’m trying to quickly create and delete a bunch of entities, and I seem to be encountering some sort of memory leak.
I replicated my problem in a pared-down way, and my code is at this sandcastle.
You’ll see that the boxes animate as you’d expect for a few seconds, then start to flicker, then stop rendering entirely. After about a minute just trying to rotate the globe is painful.
I’m sure I’m missing something obvious here but I’m at a loss.
Thank you!
I tried switching from box entities to points (Sandcastle here) and it seems to degrade even more quickly. Interestingly, after a while it ends up emitting error messages to the console:
Error loading image for billboard: DeveloperError: Width must be less than or equal to the maximum texture size (16384). Check maximumTextureSize.
Error
at new DeveloperError (DeveloperError.js:39:11)
at Texture (Texture.js:97:11)
at resizeAtlas (TextureAtlas.js:206:24)
at addImage (TextureAtlas.js:349:5)
at getIndex (TextureAtlas.js:363:3)
at TextureAtlas.js:459:19
Based on the bit about texture in the stack trace, I tried yet another example with a single color, and that seems to run fine forever. (Yet another Sandcastle here.)
So by generating a ton of random colors am I swamping some texture buffer somewhere? Do colors not get garbage collected at some level?
Thanks yet again.