can not release memory
See original GitHub issueI used cesium in the angular2 to create an earth component. like this

When this component is logged off I have manually destroyed the viewer objectand when I destory this component
ngOnDestroy() {
this.viewer.entities.removeAll();
this.viewer.destroy();
}
In my program, this component is in a state of rotation that is constantly created and destroyed.
But I found that when the component is created will take about 100MB of memory, and in the destruction will not release memory. So when the program runs for some time, the memory consumption is very alarming.

I worry that there will be some memory leaks, there is no way to manually release the memory occupied by webgl?
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Memory is not being released - Stack Overflow
There is a lot going on here. First, using Go version 1.14.2 your program works fine for me. It does not appear to...
Read more >A.6 Resolving Memory Problems - Oracle Help Center
When a Java program needs memory, it requests this memory from the JVM. If there is no memory left, then the JVM will...
Read more >Windows 10 not releasing standby memory when required.
Click the Performance tab and the Resource Monitor button. Click the Memory tab and check whether Free is near to Zero or is...
Read more >How we find and fix OOM and memory leaks in Java Services
There is a memory leak, which for a long-running process, will lead to not having enough resources eventually.
Read more >Why JVM does not release unused memory eagerly, a ...
Memory is not used continuously. It will be fragmented over time when different processes start and end which is almost equivalent to allocating ......
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

Proposal try use
this.viewer?.canvas.getContext('webgl')?.getExtension('WEBGL_lose_context')?.loseContext();will find memory leak recovery normal!!!@OmarShehata my original code snippet no longer causes large memory increase in Chrome. We should be able to just close this. Everything else is outside of our control so there’s no reason to keep this issue open. As long as
Viewer.destroyis being called, memory gets freed.Please confirm https://github.com/CesiumGS/cesium/issues/5462#issuecomment-308130948 doesn’t lead to unbounded memory growth or anything like that for you.