static void clearMapWithCleanUp(Map map) { if (map == null) ret; cleanUp(map); map.clear(); }