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

Scene: Remove dispose(). #19972

Merged
merged 1 commit into from Jul 31, 2020
Merged

Scene: Remove dispose(). #19972

merged 1 commit into from Jul 31, 2020

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jul 31, 2020

Scene.dispose() was introduced with #15523 in order to clear cached objects in WebGLRenderLists and WebGLRenderStates. At that time, it was necessary since the caches were plain objects.

Later, #17242 turned these objects into weak maps. I've realized now that this change made explicit disposals of scenes superfluous since the entries in the maps are automatically removed if a scene object is not used anymore. If the entire renderer is disposed, the maps are cleared anyway.

In contrast to other engine entities like geometries or textures, render lists and states do not have a GPU pendant so deallocating data from the GPU is not necessary.

This PR would also make #19645 not necessary anymore.

@mrdoob mrdoob added this to the r120 milestone Jul 31, 2020
@mrdoob mrdoob merged commit c6ab22b into mrdoob:dev Jul 31, 2020
@mrdoob
Copy link
Owner

mrdoob commented Jul 31, 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.

None yet

2 participants