Free SKMap (Skobbler) memory in iOS app

I am making an iOS application that uses SKMap (Skobbler). When opening SKMap, my application consumes a lot of memory. Moreover, it does not free memory when I go to another page of the application.

I put some code in the viewWillDisappear method to release SKMap memory,

[[SKRoutingService sharedInstance].mapView clearAllAnnotations]; [SKRoutingService sharedInstance].routingDelegate = nil; [SKRoutingService sharedInstance].navigationDelegate=nil; [[AudioService sharedInstance]cancel]; [[SKRoutingService sharedInstance]stopNavigation]; [[SKRoutingService sharedInstance]clearCurrentRoutes]; [[SKRoutingService sharedInstance]clearAllRoutesFromCache]; [SKRoutingService sharedInstance].mapView = nil; //self.mapView is SKMap self.mapView.settings.displayMode = SKMapDisplayMode2D; self.mapView.delegate=nil; [self.mapView removeFromSuperview]; self.mapView=nil; 

If you have a decision to free memory for this, please help me.

+5
source share
1 answer

I wrote to them to ask about this, received this answer:

The C ++ code internally uses one singleton card and will keep the card instance active even after destroying the iOS card view - you cannot force the C ++ library to free memory at the iOS / Android level. This decision was made back in those days when it was considered more important to conduct a quick "card recovery" procedure than a small amount of memory.

0
source

Source: https://habr.com/ru/post/1206718/


All Articles