update: memory gc() aggressively
MODIFY
src/android/plugin/google/maps/CordovaGoogleMaps.java
src/android/plugin/google/maps/CordovaGoogleMaps.java
@@ -686,6 +686,7 @@ public class CordovaGoogleMaps extends CordovaPlugin implements ViewTreeObserver
mPluginLayout.pluginMaps.clear();
System.gc();
+ Runtime.getRuntime().gc();
}
});
@@ -699,6 +700,8 @@ public class CordovaGoogleMaps extends CordovaPlugin implements ViewTreeObserver
pluginMap.onDestroy();
mPluginLayout.HTMLNodes.remove(mapId);
}
+ System.gc();
+ Runtime.getRuntime().gc();
callbackContext.success();
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)

MODIFY
src/android/plugin/google/maps/PluginMap.java
src/android/plugin/google/maps/PluginMap.java
@@ -667,6 +667,7 @@ public class PluginMap extends MyPlugin implements OnMarkerClickListener,
map = null;
mapView = null;
System.gc();
+ Runtime.getRuntime().gc();
if (callbackContext != null) {
sendNoResult(callbackContext);
}

update: memory gc() aggressively