I\'m struggling with a memory leak issue at Google Maps Android API v2. The heap usage increases by about 85KB every time my view becomes visible again after:
I tried to use System.gc() and map.clear() before the map is initialized.
@Override
public void onActivityCreated (Bundle savedInstanceState){
super.onActivityCreated(savedInstanceState);
if (GooglePlayServicesUtil.isGooglePlayServicesAvailable(getActivity()) == ConnectionResult.SUCCESS) {
System.gc();
getMap().clear();
setupmap();
}
}
@Override
public void onLowMemory() {
super.onLowMemory();
System.gc();
}