How do I force unload of an ArcGIS mapview?

886
2
05-22-2017 04:40 AM
Armandvan_der_Zwan
New Contributor II

I want to unload an ArcGIS MapView when I receive a memory warning and the current selected tab of my tabBarController is not the MapView. I rebuild it when the view becomes visible again.

I tried:

[self removeAllOverlays]; // this is my own function for removing all
[self.arcGISMap.locationDisplay.dataSource stop];
self.arcGISMap.locationDisplay.locationChangedHandler = nil;
self.arcGISMap.touchDelegate = nil;
self.arcGISMap = nil;
self.map = nil;
self.dataSource = nil;

But it does not seem to help. How to I properly break down a MapView?

0 Kudos
2 Replies
DiveshGoyal
Esri Regular Contributor

Try removing it from the view hierarchy

0 Kudos
Armandvan_der_Zwan
New Contributor II

I can't do that. It is one of the main Tabs in my main TabBarController...

0 Kudos