osmdroid: Sample application, memory leaks found by LeakCanary
Issue Type
[ X] Bug
Description and/or steps/code to reproduce the problem
I was using the demo application and noticed that LinearLayout is leaked when calling a sample and moving back to the ListView. I added screenshots from three different cases below.
Environment
If it’s a bug, version(s) of android this affects:
All
Version of osmdroid the issue relates to:
6.1.5

About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (5 by maintainers)
Commits related to this issue
- Merge pull request #1468 from mat8854/bug/#1463 bug/#1463 - Sample application, memory leaks found by LeakCanary — committed to osmdroid/osmdroid by monsieurtanuki 5 years ago
So far so good. The solution seems to be:
Fragments, theViews must benulled inonDestroyView(which is already the case inBaseSampleFragmentbecause of an old memory leak issue #335)superstatement last inonDestroyViewAs there are about 140
Fragments in the demo app, the fix is not going to be instant (though it’s easy). I’m working on it.