Outdooractive / route-me

Open source map library for iOS
Other
122 stars 400 forks source link

retain cycle #102

Open incanus opened 12 years ago

incanus commented 12 years ago

RMMapView creates one or more RMMapTiledLayerView objects which in turn retain the RMMapView:

https://github.com/Alpstein/route-me/blob/release/MapView/Map/RMMapTiledLayerView.m#L41

When the RMMapView is released, this is never explicitly cleaned up. Now that location services are available, removing a map view from the view hierarchy won't necessary turn them off since the map view never goes away from memory.

trasch commented 12 years ago

Ok, I see. I added the retain in RMMapTiledLayerView to get rid of some crashes when the CATiledLayer is too slow to clean up before the map view goes away. I'll check this.

rsalsman commented 12 years ago

I'd also like to add that RMAnnotation's retain a copy of the map view as well, which causes a similar problem to the RMMapTiledLayerView.

onato commented 11 years ago

Any progress on this issue? Can I help?

incanus commented 11 years ago

I haven't had a chance to check things out in depth yet. @trasch, any luck?

trasch commented 11 years ago

No, not yet. I'll have a look at it soon, I'll have to do some route-me related stuff anyway.

onato commented 11 years ago

I found and fixed another retain cycle. I sent the pull request above, however there seem to be a backlog of pull requests going back five months. Should I be fixing a different branch/fork?