-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-instance Memory Leak #939
Comments
Looks this was introduced by PR #694, made by @felipecsl , merged by @spikebrehm. Calls to |
Thanks for reporting this. Sounds like a legit issue. We'll take a look! |
how is it going with this bug? Im currently running into this problem! |
no progress yet! |
Anything we can do to help? Is it a pretty deep issue? Any details you can share with the underlying issue? Thx |
On debugging I found two causes for this memory leak:
|
@aashna208 can you post the fix here for point 2 you've mentioned. I would like to give it a try. |
Just created a PR (#1130). It reverts some changes in PR#694, and puts some extra patch from here (IjzerenHein@14ca6f7). |
@mattshen I had a look at your PR. Without knowing it, in my issue 1102 I came to a similar conclusion, with a fix fully in AirMapView.java (no change in AirMapManager.java). (I don't know if one is better than the other). |
Hi @psam44, Just saw you've updated issue#1102 with more details. Will try that out later |
Has anyone tested this yet? I still seem to be loosing memory when showing and hiding MapView. |
With react-native-maps: "0.14.0", I still see memory jumping by ~100Mb when rendering by looking at perf monitor in iOS simulator. And the memory usage did not fully recover after the map component unmount. |
same on Android, the memory isn't fully recovered after unmounting the map view. I guess it's somehow related to GC. However, we haven't experienced any crashes or serious issues regarding this. |
Experiencing the same problem on iOS simulator @freeljt After: It drops back down after a while from what I assume is RN's GC, but not sure of an interim fix. |
memory issues here. |
On Android, when using react-native-maps with the react-native-router-flux router, when a map is loaded over and over, there is a large memory leak that can result in an application crash.
It appears that the map instance is not disposed of. After a short look at a heap dump, it seems like 'AirMapView' is not getting disposed. I suspect this is a native Java wrapper around the Google Maps instance.
It looks like the issue was introduced after
0.10.1
, and exists in0.11.0
.I've created a simple project to make this issue easy to reproduce.
https://github.com/gregberns/ReactNativeMapTest
I haven't done much work with this project or RN's native components, but I'll try and dig in a little further and see where it can go, but any help to resolve this would be very welcome.
The text was updated successfully, but these errors were encountered: