@Override public void onDestroy() { if (this.mapView != null) { this.mapView.destroyAll(); } super.onDestroy(); }
/** * Android Activity life cycle method. */ @Override protected void onDestroy() { mapView.destroyAll(); AndroidGraphicFactory.clearResourceMemoryCache(); tileCaches.clear(); super.onDestroy(); }
@Override protected void onDestroy() { this.mapView2.destroyAll(); super.onDestroy(); }
@Override protected void onDestroy() { /* * Whenever your activity exits, some cleanup operations have to be performed lest your app * runs out of memory. */ mapView.destroyAll(); AndroidGraphicFactory.clearResourceMemoryCache(); super.onDestroy(); } }
@Override public void onDestroy() { super.onDestroy(); this.mMapView.destroyAll(); MapUtils.clearRessources(); }
@Override public void onDestroy() { super.onDestroy(); this.mMapView.destroyAll(); MapUtils.clearRessources(); }
/** * Cleans up mapsforge events * Calls mapsforge destroy events and sets map-related object to * null to enable garbage collection. */ private void releaseMap() { Log.i(TAG, "Cleaning mapsforge components"); if (mTileCache != null) { mTileCache.destroy(); } if (mMapView != null) { // save map settings mMapView.getModel().save(mPreferencesFacade); mPreferencesFacade.save(); mMapView.destroyAll(); mMapView = null; } // release zoom / move observer for gc this.mMapObserver = null; MapUtils.clearRessources(); }