Bumping this last question. What's the proper way to recycle/destroy/free up resources for an ArcGIS Map?
I'm getting lots of weird side effects, even when working with one map - such as when I close my application, then restart it, graphics will no longer be visible on the graphics layer (this problem even exists when there is only one map). In order for the graphics to become visible again, I must close the application, then 'Force Stop' my application and re-open. The graphics will now be visible again.
This perhaps seems like a problem of resources no getting cleaned up? But how should we do so?
Have you tried invalidating the map upon resume to see if the redraw happens?
Yes, I've tried invalidate and postInvalidate.
What about when stepping through, are all of the objects still counted in the GraphicsLayer?
I don't mean to ask basic questions, but I haven't experienced this and I have three such layers at a time.
What's the proper way to recycle/destroy/free up resources for an ArcGIS Map?
MapView map; //******* //******** @Override protected void onDestroy() { super.onDestroy(); map.recycle(); } @Override protected void onPause() { super.onPause(); map.pause(); } @Override protected void onResume() { super.onResume(); map.unpause(); }
We do not support multiple MapViews with this release of the SDK. This is a limitation of our current implementation and there is no workaround unfortunately. We are working to resolve this in the next release.