question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clear scene but memory is not removed.

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
aardgoosecommented, Aug 20, 2017

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)

1reaction
aardgoosecommented, Aug 21, 2017

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found