Alex Nasardinov
Alex Nasardinov

Reputation: 21

UIDatePicker leaks when changes state

I have a UIDatePicker in a static UITableViewCell. I tried performing it programmatically and by using storyboard in accordance with answer https://stackoverflow.com/a/13964772/4488191. It didn't help.

Xcode Instruments Leaks show that calls -[_UIDatePickerMode _yearlessYearForMonth:] which leaks.

UIDatePicker leaks when datePickerMode property is UIDatePickerModeDate. When this property is default or UIDatePickerModeTimethere are no memory leaks.

Is it a UIDatePicker bug?

Upvotes: 2

Views: 219

Answers (1)

david
david

Reputation: 133

I believe that the answer is "yes, it's a UIDatePicker bug". I am using a date picker in a popover and seeing the same sort of problem. I've created a test app that demonstrates the behaviour (https://github.com/david-ape/datepickertest/) and I've posted a related question at UIDatePicker memory leak in IOS 8.3 in order to try to get confirmation and find possible workarounds.

Upvotes: 2

Related Questions