Hi, I'm working in an application that load geographic features on demand, and I'm having problems when trying to remove features to get free memory.
I've tried code like this, because I don't know if removeLayer remove FeatureCollections automatically, but I don't realize the application use less memory when doing it. Is there any way to remove al layers and features linked to a context to make JVM release memo? Any idea???
for (int i = 0; i < context.getLayerCount(); i++) {
(context.getLayer(i)).getFeatureSource().getFeatures().clear();
context.removeLayer(i);
//context.removeLayer((MapLayer) context.iterator().next());
}
(context.getLayer(i)).getFeatureSource().getFeatures().clear();
context.removeLayer(i);
//context.removeLayer((MapLayer) context.iterator().next());
}
Thanks very much... Peter
Yahoo! Personals
Single? There's someone we'd like you to meet.
Lot's of someone's, actually. Yahoo! Personals
