@Override public void onDestroy() { for (ForecastReport forecastReport : forecastReports.values()) { forecastReport.onDestroy(); } this.forecastReports.clear(); this.forecastReports = null; super.onDestroy(); }
public synchronized void unsubscribe(String place) { if (place != null && !place.isEmpty()) { if (place.equals(Constants.LOCATION_CURRENT_PLACE)) { place = getPlaceLocation(place, false).getPlace(); } ForecastReport forecastReport = forecastReports.get(place); if (forecastReport != null) { forecastReport.onDestroy(); forecastReports.remove(forecastReport.place); } } }