MKUserTrackingBarButtonItem should not retain its map view
| Originator: | amorya | ||
| Number: | rdar://15237046 | Date Originated: | 16-Oct-2013 01:09 AM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 7.0 |
| Classification: | Other Bug | Reproducible: | Not Applicable |
I ran into a memory leak where I had a view controller with strong references to an MKMapView and a MKUserTrackingBarButtonItem. When my view controller was deallocated, the map view remained in memory. The culprit was a retain cycle, caused because the MKUserTrackingBarButtonItem was retaining its map view. I solved it with a workaround, by setting the MKUserTrackingBarButtonItem's mapView property to 'nil' when my view controller was deallocated. However, this should not need to be the case. The MKUserTrackingBarButtonItem's mapView property should be a weak property.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!