Out of memory exception when loading lot of tiles in different zoom levels
- Unity version: 2020.3 LTS
- Mapbox SDK version: Performance Testing Branch
- Device: Google Pixel 2
- Scripting Backend : Mono
By zooming and panning a lot around the map i reached the memory limit of the application/device on android. Logcat is throwing frame by frame this message:

i think this could be critical as the application will stuck completely at this point and needs user actions to close and re-open the app-task manually.
@brnkhy : What do you think ? Are there parts of sourcecode regarding tile loading which could be improved or even leak memory ?
there are also some approaches regarding memory management which could lower this issue a bit like:
- use the largeHeap=true flag in in android manifest --> has sideeffects and should be the last option.
- unchecking incremental garbage collection in player settings. Maybe the default mode of the GC can handle the critical situation better
- maybe using IL2CPP with arm64 instead of Mono (armv7): should not affect the issue on pixel 2 as the overall memory of the device is not over 4gb
@Markovicho I haven't tested with android and we currently mainly test on iOS but this is interesting. the problem with performance branch is I have no idea which state this was. performance branch has been generally stable past few months but sure there was bugs introduced here and there. I think current performance-head is at a good point for example but it's much more different than earlier versions as it uses Tasks (thread) for a lot of stuff now. faster but that also means a lot of new possible bugs of course. would be interesting to know how it works on android, can you please let me know if you try a recent version out 🙏