on Destroy
Call this method from the parent Activity/Fragment's corresponding method.
In your Activity/Fragment:
protected void onDestroy() {
super.onDestroy();
if (mapControl != null) {
mapControl.onDestroy();
mapControl = null;
}
}
Content copied to clipboard
See also
<a href="https://developer. android. com/reference/android/app/Activity#on Destroy()">Activity. on Destroy()</a>