Skip to content

Conversation

@takahirox
Copy link
Collaborator

@takahirox takahirox commented Nov 8, 2020

Related issue: Fixed #20637.

Description

This PR resolves memory leak caused by using Object.keys() in WebGLBindingStates (refer to #20637 for more detail).

@Usnul I confirmed by using Firefox Memory allocation profiler that this change resolves the problem, and I'm happy if you test in your side just in case, too.

@takahirox takahirox requested a review from Mugen87 November 8, 2020 06:22
@Usnul
Copy link
Contributor

Usnul commented Nov 8, 2020

I confirm that this removed the allocation!

Copy link
Contributor

@Usnul Usnul left a comment

Choose a reason for hiding this comment

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

Perhaps have a utility function somewhere to count properties on an object for the future? More of a point for wider group of maintainers.

@Mugen87 Mugen87 added this to the r123 milestone Nov 9, 2020
@mrdoob mrdoob merged commit 84b7a63 into mrdoob:dev Nov 9, 2020
@mrdoob
Copy link
Owner

mrdoob commented Nov 9, 2020

Thanks!

@takahirox takahirox deleted the FixMemoryLeak branch November 9, 2020 20:25
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.

WebGLBindingStates: Memory leak in needsUpdate().

4 participants