applidium / ADClusterMapView

MKMapView with clustering
http://applidium.github.io/ADClusterMapView/
Other
658 stars 129 forks source link

delegate is not weak #48

Closed sareninden closed 8 years ago

sareninden commented 9 years ago

In the ADClusterMapView.m interface part is an secondary delegate declared. @interface ADClusterMapView () { @private id _secondaryDelegate;

This should be weak to prevent retain cycles, currently delegates are retained strongly causing a retain cycle.

suggested code

@interface ADClusterMapView () { @private __weak id _secondaryDelegate;

sareninden commented 9 years ago

This can easily be reproduced by creating a view controller with the ADClusterMapView and setting the delegate. presenting this view controller and dismissing it will not call dealloc.

Nooba commented 8 years ago

Fixed in version 1.1.1