Closed dryaz closed 11 months ago
Possibly the same as https://github.com/mapbox/mapbox-maps-android/issues/2079
@dryaz thanks, we will check.
Looks like an incorrect lifecycle handling issue for compose extension, I've created an internal ticket and will update when the fix is landed.
This has been fixed in https://github.com/mapbox/mapbox-maps-android/releases/tag/v11.0.0-rc.2.
Environment
Observed behavior and steps to reproduce
Compose Mapbox crashes when try to hide/show and navigate with compose navigation approach (add composable based on some flag).
Steps to reproduce:
Dowload repository
Switch to 11.0.0-beta.3
Build compose-app
Open multi display sample
Hide/Show map on default display multiple times
Check profiler, native memory increased (leak canary won't be triggered)
Crash after hide/show process
Expected behavior
No memory leak, no crash
Notes / preliminary analysis
Bitmaps are leaking. There were some issues in past when location provider causes memory leaks but it's not the case 'cause leaks happening also with disabled location.
Additional links and references
Dump from profiler: memory-20230913T011301.heapprofd.zip