Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] Clear out mapCallback's OnMapReadyCallbacks on onDestroy
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Darby authored and tobrun committed Sep 11, 2017
1 parent 2bbde69 commit a5bfb4a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ public void onStop() {
@UiThread
public void onDestroy() {
destroyed = true;
mapCallback.clearOnMapReadyCallbacks();
nativeMapView.destroy();
nativeMapView = null;
}
Expand Down Expand Up @@ -1014,5 +1015,9 @@ boolean isInitialLoad() {
void addOnMapReadyCallback(OnMapReadyCallback callback) {
onMapReadyCallbackList.add(callback);
}

void clearOnMapReadyCallbacks() {
onMapReadyCallbackList.clear();
}
}
}

0 comments on commit a5bfb4a

Please sign in to comment.