add onDetach-method to MapScaleBarLayer to free resources automatically

removed mapScaleBar.destroy() methods from onDestroy-Activity methods
changed global mapScaleBar-variables to local
This commit is contained in:
Meibes
2020-01-26 16:39:44 +01:00
parent f449a0a6fb
commit ebe98c8990
4 changed files with 9 additions and 24 deletions

View File

@@ -62,4 +62,10 @@ public class MapScaleBarLayer extends Layer implements Map.UpdateListener {
mapScaleBar.redrawNeeded = false;
}
@Override
public void onDetach() {
super.onDetach();
mapScaleBar.destroy();
}
}