[android] Clear out mapCallback's OnMapReadyCallbacks on onDestroy
This commit is contained in:
@@ -264,6 +264,7 @@ public class MapView extends FrameLayout {
|
||||
nativeMapView.terminateContext();
|
||||
nativeMapView.terminateDisplay();
|
||||
nativeMapView.destroySurface();
|
||||
mapCallback.clearOnMapReadyCallbacks();
|
||||
nativeMapView.destroy();
|
||||
nativeMapView = null;
|
||||
}
|
||||
@@ -955,5 +956,9 @@ public class MapView extends FrameLayout {
|
||||
void addOnMapReadyCallback(OnMapReadyCallback callback) {
|
||||
onMapReadyCallbackList.add(callback);
|
||||
}
|
||||
|
||||
void clearOnMapReadyCallbacks() {
|
||||
onMapReadyCallbackList.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user