question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can not release memory

See original GitHub issue

I used cesium in the angular2 to create an earth component. like this image

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. _20170612190429 image

I worry that there will be some memory leaks, there is no way to manually release the memory occupied by webgl?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
GunOmnisciencecommented, Sep 11, 2022

Proposal try use this.viewer?.canvas.getContext('webgl')?.getExtension('WEBGL_lose_context')?.loseContext(); will find memory leak recovery normal!!!

2reactions
mramatocommented, May 11, 2020

@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.destroy is 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found