Memory leak
See original GitHub issueI see a memory usage increase each time I move camera between two different location. Reloading browser window releases all memory, however even destroying ReactMapboxGl
(not rendering it on page) does not release memory.
Therefore I think there is a memory leak somewhere. Last time I checked when jumping between two locations it went up to 1GB or RAM usage. I don’t think that it’s GC that does not release memory, it looks to me that some resources are being accumulated each time I move the map.
Now it can be issue with mapbox-gl or react-mapbox-gl itself, I am not sure about that.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Memory leak - Wikipedia
In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in...
Read more >What is Memory Leak? How can we avoid? - GeeksforGeeks
Memory leak occurs when programmers create a memory in heap and forget to delete it. The consequences of memory leak is that it...
Read more >Definition of memory leak - PCMag
When memory is allocated, but not deallocated, a memory leak occurs (the memory has leaked out of the computer). If too many memory...
Read more >Memory Leaks and Garbage Collection | Computerworld
DEFINITION A memory leak is the gradual deterioration of system performance that occurs over time as the result of the fragmentation of a...
Read more >Find a memory leak - Windows drivers - Microsoft Learn
A memory leak occurs when a process allocates memory from the paged or nonpaged pools, but doesn't free the memory.
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 FreeTop 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
Top GitHub Comments
@philpl I was able to reproduce memory increase by switching between “All shapes” and “GEOJSON” many times on @alex3165 website. I went as far as 2GB of RAM before I gave up. Not exactly sure what causes this. If it was simply cache issue, then I guess it would have released tiles over time because the map does not really move anywhere. Instead it keeps growing…
I test with Safari on latest macOS.
In my case I have electron app where I simply fly between two fixed locations and memory usage only keeps growing.
Hey everyone, it is been a long time since this issue hasn’t been updated. Although with react-mapbox-gl v2 I potentially fix some memory leaks issues and mapbox-gl itself fixed some too so it is unlikely this issue is relevant anymore. If so feel free to open a new issue with some more explanations.