Clear scene but memory is not removed.
See original GitHub issueI updated to r87 recently, in r86 I dispose and remove all from the scene after clear garbage memory is clear but in r87 is not.
I check in memory debug on firefox browser found it remain in renderItems
at src/renderers/webgl/WebGLRenderLists.js
and so I add code renderer.dispose()
memory is cleared, but I not want to destroy the renderer.
Three.js version
- Dev
- r87
- …
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Hardware Requirements (graphics card, VR Device, …)
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How to free up memory by removing unnecessary ...
QGraphicsScene can handle this and will not try to display deleted items. clear() only removes it from scene but doesn't frees memory.
Read more >How to delete assets from the memory - Questions - Babylon.js
Babylon itself removes all references to the object, but if your scene still holds the variable (i.e. it is not deleted or set...
Read more >Remove object and clear from memory? - Python Support
Hello all, The normal way to remove an object from a scene in Blender 2.5 is to unlink it - e.g., to use...
Read more >Memory grows every scene and can't be cleared. - Unity Forum
When profiling the app in unity I get an ongoing 4mb memory jump every time I load a scene and come back to...
Read more >How to dispose of objects – three.js docs
The deleted internal resources will be created again by the engine. So no runtime error will occur but you might notice a negative...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Have you tried
renderer.renderLists.dispose();
Which removes all the renderers references to renderItems?
( I hit this problem which is why renderLists is now exposed, although this was before r86)
It’s OK to use renderLists.dispose() , I exposed it for this purpose. It doesn’t destroy any state that can’t be reestablished from your scene(s) and camera object(s) as required. see #11497