@Override protected void onDestroy() { super.onDestroy(); if (getEmotionsTask != null) getEmotionsTask.cancel(true); Set<String> keys = emotionsPic.keySet(); for (String key : keys) { emotionsPic.put(key, null); } }