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

Prevent memory leak in WebGLRenderList #13249

Closed
wants to merge 1 commit into from

Conversation

richkzad
Copy link

@richkzad richkzad commented Feb 4, 2018

I noticed that WebGLRenderList was maintaining references to objects I had previously removed from my scene.

This is a problem if your scene currently has less objects than it did in the past.

I see that a dispose() method was added, but that clobbers the entire list, unnecessarily. I don't think it should be up to the three.js user that they should be disposing this renderList, either, it seems very much like an implementation detail.

This PR makes it so that any renderList slots that aren't currently used are cleared out, preventing memory leaks for everybody.

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 4, 2018

We already have a PR for this: #12464

@richkzad
Copy link
Author

richkzad commented Feb 4, 2018

Ah okay, great!

@richkzad richkzad closed this Feb 4, 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

Successfully merging this pull request may close these issues.

2 participants