[android] - clear map change listeners when map is destroyed
This commit is contained in:
@@ -410,6 +410,7 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
|
||||
@UiThread
|
||||
public void onDestroy() {
|
||||
destroyed = true;
|
||||
onMapChangedListeners.clear();
|
||||
mapCallback.clearOnMapReadyCallbacks();
|
||||
|
||||
if (nativeMapView != null && hasSurface) {
|
||||
|
||||
@@ -100,9 +100,10 @@ final class NativeMapView {
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
nativeDestroy();
|
||||
viewCallback = null;
|
||||
destroyed = true;
|
||||
onMapChangedListeners.clear();
|
||||
viewCallback = null;
|
||||
nativeDestroy();
|
||||
}
|
||||
|
||||
public void update() {
|
||||
|
||||
Reference in New Issue
Block a user