How to close OpenGL render contexts?
See original GitHub issueWhat is the correct approach to “stop” or delete a render context?
In my Vue application, I am opening and closing vtk render windows. They do not seem to get garbage collected, since after 16 windows are opened, I get the following message:
WARNING: Too many active WebGL contexts. Oldest context will be lost.
This sounds like a memory leak issue.
How do I tell a render window to shut down and close its context, so it can be garbage collected properly?
Issue Analytics
- State:
 - Created 4 years ago
 - Comments:18 (5 by maintainers)
 
Top Results From Across the Web
How to close OpenGL render contexts? #1157 - Kitware/vtk-js
What is the correct approach to "stop" or delete a render context? In my Vue application, I am opening and closing vtk render...
Read more >Deleting a Rendering Context - Win32 apps
In this article. The following code sample shows how to delete an OpenGL rendering context when an OpenGL window is closed.
Read more >OpenGL Context - OpenGL Wiki
The current context is a thread-local variable, so a single process can have several threads, each of which has its own current context....
Read more >GL Context destruction - c++
You should shut down your rendering context before you destroy your window. Share.
Read more >OpenGL - Context creation
When rendering a frame, the results will be stored in an offscreen buffer known as the back buffer to make sure the user...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

🎉 This issue has been resolved in version 11.1.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
inside the genericRenderWindow definition the following might work