Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memory leak when loading texture with ImageBitmap (#499)
During rendering large-scale 3DTiles with high resolution textures, we identified a memory leak problem. When continuously loading new tiles, memory usage would constantly increase without being released. And the browser will crash after console reported the error `Couldn't load texture blob: http://xxx` I found that it cause by GLTFLoader loaded textures with ImageBitmap and did not close or dispose it when tiles be disposed. https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/GLTFLoader.js#L2547 After this fix, I have tested that the memory won't increase endlessly. It will reach the top when geometry and textures in scene maintain in a reasonable value. related issue: mrdoob/three.js#23953
- Loading branch information