Skip to content
This repository has been archived by the owner on May 9, 2018. It is now read-only.

Retain cycle in mapView #633

Open
chchrn opened this issue May 20, 2015 · 1 comment
Open

Retain cycle in mapView #633

chchrn opened this issue May 20, 2015 · 1 comment
Labels

Comments

@chchrn
Copy link

chchrn commented May 20, 2015

Hi! I think i found retainCycle.
In RMCircle you using code:

@interface RMCircle : RMMapLayer
{
    RMMapView *mapView;
....
}

And in RMMapView:

_accuracyCircleAnnotation.layer = [[RMCircle alloc] initWithView:self radiusInMeters:newLocation.horizontalAccuracy];

Instance of RMMapView retaining _accuracyCircleAnnotation, and _accuracyCircleAnnotation retaining instance of RMCircle,which retaining mapView.
I have reproduced it in my code. And when I used __weak for ivar in RMCircle, mapView began released.

@username0x0a
Copy link

Yup, there are many nasty cirlces/retaining stuff around annotations and layers code. Hopefully there's some area for clean up.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants