Trouble disposing Background from memory

I’m making a galleries app that allows you to visit different art galleries and am using the CubeTextureLoader class to create a cubemap for the background. I’m having trouble of disposing this background from memory. I’m successfully disposing all the other textures and materials but even after trying
this.scene.background.dispose();
this.scene.background = null;
I am still finding a program and geometry getting logged in from renderer.info:

Thanks for any guidance on how to dispose of it.

The renderer internally creates meshes for textures backgrounds which are not accessible for users. Meaning you can’t free the related internal resources.

However, the renderer ensures to just create a single mesh for backgrounds with cube textures and another one for normal textures. These entities do no have a significant effect on the memory.

1 Like

OK. Got it, thanks!

Does this have an effect on the stats in WebGLRenderer.info.memory?

I’m trying to keep track of resources using the geometry and texture counts provided herein, and I seem to be left with 1 texture and a few geometries when my JSON scene contains an envmap, even though I find the envmap by traversing the scene and dispose of it.

I’m trying to work out if there’s a link, without delving into the source code too much.