mapbox / DEPRECATED-mapbox-ios-sdk

REPLACED – use https://www.mapbox.com/ios-sdk instead
https://github.com/mapbox/mapbox-gl-native
Other
323 stars 8 forks source link

Possibly some memory issues #221

Open ilmarion opened 11 years ago

ilmarion commented 11 years ago

Hello. I've found some places in MapBox sources (ver. 1.0.1) which probably can cause memory problems.

  1. RMMapView, _delegate ivar is __strong so retain cycle is possible.
  2. 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.
  3. RMMemoryCache, _memoryCacheQueue is created but never released.
  4. RMTileCache, _tileCacheQueue is created but never released.
  5. RMQuadTree (and all its nodes) holds strong reference to the RMMapView so retain cycles are possible.
  6. RMQuadTreeNode, parentNode property is strong so retain cycles between nodes are possible.
incanus commented 11 years ago

Thanks for these reports. I will investigate. Most of this comes down from https://github.com/Alpstein/route-me FWIW.

vzqwer commented 10 years ago

I have problems with retain cycles when pushing and popping controller with RMMapView. When is it planned to fix this issues?

jrmatchett commented 10 years ago

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.

incanus commented 10 years ago

Many of these have been fixed as of 4f1fc00d73f82eac8f83da9d80c68a91c4f96dd0.

incanus commented 10 years ago

@ilmarion Would be interested in submitting a pull request if you are still seeing any of these?

ilmarion commented 10 years ago

@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.

jvieten commented 10 years ago

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 .