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.

I 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:closed
  • Created 7 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
pronebirdcommented, Feb 28, 2017

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

0reactions
alex3165commented, Aug 24, 2017

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.

Read more comments on GitHub >

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

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