Skip to content

Memory Leak | Bloom #132

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

Closed
pixelass opened this issue May 27, 2022 · 5 comments · Fixed by #179
Closed

Memory Leak | Bloom #132

pixelass opened this issue May 27, 2022 · 5 comments · Fixed by #179

Comments

@pixelass
Copy link

As described in #68 there's a memory leak when updating the intensity of Bloom

Here's our reproduction:

https://codesandbox.io/s/mystifying-kare-k4lh3b?file=/src/App.js

useFrame(() => {
  if (bloomRef.current && intensityRef.current) {
      bloomRef.current.intensity = intensityRef.current;
  }
});

Screencast: (Activity Monitor > View > Update Frequency > Very Often (1sec)

Bloom_Memory_Leak

@chasedavis
Copy link
Contributor

maybe related discussion/cause here

@cmrnfaith
Copy link

Was there ever a solution created for this issue? I am running into the same issue within my project.

@chasedavis
Copy link
Contributor

Was there ever a solution created for this issue? I am running into the same issue within my project.

Not to my knowledge. If you use postprocessing directly it's avoidable though.

@max-hans
Copy link

What do you mean by "directly"?

@chasedavis
Copy link
Contributor

@max-hans this library (react-postprocessing) is a thin react abstraction over postprocessing. If you use postprocessing API's directly instead of this library you will likely not run into this issue (but will also have to do lifecycle management yourself).

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 a pull request may close this issue.

4 participants