Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

potential leak while disposing WebGLRenderer #8987

Closed
4 of 11 tasks
olivierchatry opened this issue May 25, 2016 · 3 comments
Closed
4 of 11 tasks

potential leak while disposing WebGLRenderer #8987

olivierchatry opened this issue May 25, 2016 · 3 comments

Comments

@olivierchatry
Copy link
Contributor

olivierchatry commented May 25, 2016

Description of the problem

Hello,

My software is switch between two renderer (threejs / own SVG renderer ), removing the gl context while swapping renderer. While profiling for leaks, I noticed that two arrays in Three WebGLRenderer are not cleared when I call dispose on the context, namely opaquesObject and transparentsObject.

https://github.com/mrdoob/three.js/blob/master/src/renderers/WebGLRenderer.js#L27

My workaround is to render an empty scene, so that they get cleared by the rendering, but it would be better if "dispose" actually clear them.

Hope I am clear enough, but if you need more information, do not hesitate

Three.js version
  • Dev
  • r77
  • [ x] ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • Linux
  • Android
  • IOS
Hardware Requirements (graphics card, VR Device, ...)
@mrdoob
Copy link
Owner

mrdoob commented May 25, 2016

Sounds good. Would you like to do a Pull Request?

@olivierchatry
Copy link
Contributor Author

Sure !

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 13, 2018

This PR should solve the issue: #13122

opaqueObjects and transparentObjects are properties of WebGLRenderList now.

@Mugen87 Mugen87 closed this as completed Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants