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

WebGLGeometries: Fix memory leak when disposing Geometry. #20479

Merged
merged 1 commit into from
Oct 9, 2020

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Oct 8, 2020

Related issues:

https://stackoverflow.com/questions/64260963/three-js-vram-memory-leak-when-adding-removing-three-geometry-to-scene

Description

This PR fixes a bug in WebGLGeometries. WebGLBindingstate.releaseStatesOfGeometry() was called with the wrong geometry object. It always has to be the instance of BufferGeometry, not Geometry.

@Mugen87 Mugen87 requested a review from takahirox October 8, 2020 12:36
Copy link
Collaborator

@takahirox takahirox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

@Mugen87 Mugen87 added this to the r122 milestone Oct 9, 2020
@mrdoob mrdoob merged commit cbc0060 into mrdoob:dev Oct 9, 2020
@mrdoob
Copy link
Owner

mrdoob commented Oct 9, 2020

Thanks!

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.

3 participants