-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Effect and EffectPass are not completely cleaned up after calling the dispose method #648
Comments
Programs and other disposable resources will be recreated automatically if you call Your reproduction steps are incomplete. How exactly are you disposing things? Have you debugged your code and checked whether |
This is the smallest scene I restored. It seems that any Effect added cannot be cleaned up normally. |
Thanks for the example 👍 This does indeed look like a bug. The In the meantime, you can manually dispose those materials as shown here: vitejs-vite-als1ht Note that the remaining geometry is the fullscreen triangle that is shared by all postprocessing passes. The lifetime of that mesh is basically tied to the WebGL context and it's being reused when needed so it shouldn't do any harm. That being said, I'll check if it can be disposed somehow. |
Thank you very much. Currently, manually disposing of these passes materials is effective. |
Description of the bug
When destroying the entire three context, two methods
removeToneMappingPass
,removeSceneFadePass
are called in the destroy method of the PostProcessingEffect class, both methods call theEffect
andEffectPass
'sdispose
method, but by printingrenderer.info
to see that there are still uncleaned programsTo reproduce
Expected behavior
renderer.info.programs
should be clearedScreenshots
Library versions used
Desktop
Mobile
The text was updated successfully, but these errors were encountered: