DEPRECATED-mapbox-ios-sdk
DEPRECATED-mapbox-ios-sdk copied to clipboard
Possibly some memory issues
Hello. I've found some places in MapBox sources (ver. 1.0.1) which probably can cause memory problems.
- RMMapView, _delegate ivar is __strong so retain cycle is possible.
- RMMapView, _viewControllerPresentingAttribution is __strong. So if _hideAttribution == NO and RMMapView instance is held by UIViewController then retain cycle will occur because this UIViewController will be stored in _viewControllerPresentingAttribution.
- RMMemoryCache, _memoryCacheQueue is created but never released.
- RMTileCache, _tileCacheQueue is created but never released.
- RMQuadTree (and all its nodes) holds strong reference to the RMMapView so retain cycles are possible.
- RMQuadTreeNode, parentNode property is strong so retain cycles between nodes are possible.
Thanks for these reports. I will investigate. Most of this comes down from https://github.com/Alpstein/route-me FWIW.
I have problems with retain cycles when pushing and popping controller with RMMapView. When is it planned to fix this issues?
Ditto--would like to see these issues fixed ASAP. It's making me hesitant to use the SDK in my shipping app. It's probably not an issue in most map-based apps because only a single map is created during the app lifecycle, but in my case i need to instantiate several map views depending on user demand.
Many of these have been fixed as of 4f1fc00d73f82eac8f83da9d80c68a91c4f96dd0.
@ilmarion Would be interested in submitting a pull request if you are still seeing any of these?
@incanus After a brief look into the current code It seems that issues 1, 2 and 5 are resolved. But 3, 4 and 6 are probably still there. I will try to find some time to investigate them more deeply.
Mm mlv
Am Montag, 1. September 2014 schrieb ilmarion :
@incanus https://github.com/incanus After a brief look into the current code It seems that issues 1, 2 and 5 are resolved. But 3, 4 and 6 are probably still there. I will try to find some time to investigate them more deeply.
— Reply to this email directly or view it on GitHub https://github.com/mapbox/mapbox-ios-sdk/issues/221#issuecomment-54083310 .