I am trying to create a MapView (currently without any overlays) inside some nested elements.
It is basically something like ScrollView -> RelativeLayout -> Rela
Take a look at the following thread:
Issue 2181:Memory leak in system when using MapView
Seems like this is something internal in MapActivity. The thread is alive for over two years now and it was not reported as fixed...
Edit: tried the solution described there and it led me to a similar solution:
try {
Field mConfigField = MapActivity.class.getDeclaredField("mConfig");
mConfigField.setAccessible(true);
Object mConfig = mConfigField.get(this);
if (null != mConfig)
{
Field mConfigContextField = mConfig.getClass().getDeclaredField("context");
mConfigContextField.setAccessible(true);
mConfigContextField.set(mConfig, null);
mConfigField.set(this, null);
}
} catch (Exception ex) {
// Do error handling
}