-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Call LoseContext
to prevent WARNING: Too many active WebGL contexts. Oldest context will be lost.
#1386
Comments
Interesting, thanks for this feedback. I'm a bit afraid of just pushing a fix, because of this comment from @Yomguithereal: Just so that I know what to target: Which version of sigma are you using? |
Yea,h I've also read through this post. And tbh, I have no idea whether this has any implications or stuff. I can only say that it works for me and I have (a) no warnings in the console and (b) I guess it also frees up the resources (at least, the warnings with "too many WebGL Contexts disappeared). But sure, this could have bad side-effects :D I'm using the newest version 3.0.0-alpha3 |
OK, good to know, I don't have to push any hot-fix to the v2.4 version, at least :) @Yomguithereal Any take on that? |
This kind of problem usually happens when one is leaking renderers somehow. It might be linked to angular's magic on component properties and the fact that ngondestroy happens before or after (can't remember) the DOM nodes of the components are actually removed from the DOM, which means the kill method is not able to work properly. The I can try some things in Does it change anything if you use a DestroyRef instead (sorry I am an angular beotian)? |
Thanks for the explanation! I'm not entirely sure whether this is related to angular or not. I already use the
|
I guess it's not much of a cost to add both those things to the |
The patch will be shipped with the next v3 alpha (or beta) release. |
Similar to #1271, I've ran into
WARNING: Too many active WebGL contexts. Oldest context will be lost.
because the context is not properly cleaned up even after calling.clear()
and.kill
.What I've tried is the following (inside
ngOnDestroy
):However, this did not solve the issue and I've come up with the following solution. However, the "type cheating" is quite hacky and I feel like this should be the default behaviour of a
.kill()
function (to properly clean up the WebGL contexts), shouldn't it?The text was updated successfully, but these errors were encountered: