Hi everyone,
I am developing an android app with using Esri Runtime SDK 100.10.0 version. And I am struggling with memory management.
I realised that MapView's resume() method causes graphic memory increase. And that increase continues until app crashes. During my tests, I was able to crash my app by using just mapview.pause() and mapview.resume() .
I am also attaching the screenshot I took from the profiler regarding the memory situation I mentioned.
I don't understand. Shouldn't the graphic memory used after at some point be cleared?
I am beginner for Esri and Android so any advice you can give will be useful to me.
Thanks in advance,
Happy coding 🙂
Solved! Go to Solution.
Hi,
Can you share any code on how the view is being managed in your android activity? The MapView along with layers when rendering is expected to allocate memory (include the native memory).
The activity lifecycle should honor pause, resume and destroy of the MapView accordingly. Do you see the same behavior when profiling this sample?
https://github.com/Esri/arcgis-runtime-samples-android/tree/main/java/display-map
Thanks
Rama
Hi,
Can you share any code on how the view is being managed in your android activity? The MapView along with layers when rendering is expected to allocate memory (include the native memory).
The activity lifecycle should honor pause, resume and destroy of the MapView accordingly. Do you see the same behavior when profiling this sample?
https://github.com/Esri/arcgis-runtime-samples-android/tree/main/java/display-map
Thanks
Rama
Hi,
I am grateful for your answer.
When I use the example you gave, no graphics were drawn on the screen, but when I triggered the onPause() and onResume() methods, I saw a stable memory usage. I think my problem occurs while drawing graphics on the screen.
Thank you for the codes you shared helped me understand the source of the problem.
Happy coding!
Gaye.
Hi @gayedurmaz, I’m facing the same problem.
In my application I draw some polygons according to information that I receive, and as soom these graphics are drawn on the map the Memory of the mobile phone grows until the application crash.
How did you manage to solve this problem?
Thanks in advance!