UISegmentedControl with bar style and tint colour leaks generated images
| Originator: | percysnoodle | ||
| Number: | rdar://13715622 | Date Originated: | 23-Apr-2013 02:08 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 6.0 |
| Classification: | Other bug | Reproducible: | Always |
Summary: When a UISegmentedControl is created with segmentedControlStyle = UISegmentedControlStyleBar and a tint color is set, then the segmented control creates images which are not cleaned up. This is most obvious when adding segments, but it can also be seen when layoutSubviews is called. Steps to Reproduce: 1. Create a segmented control with UISegmentedControlStyleBar and any tintColor (e.g. [UIColor purpleColor]) 2. Repeatedly add and remove segments 3. Observe memory usage in Instruments See https://github.com/percysnoodle/SegmentedControlLeakTester for a minimal project which demonstrates the behaviour. Expected Results: Memory usage should be bounded. Actual Results: Memory usage increases until the application is killed. Regression: Yes - this behaviour is not observed in iOS 5.1 Notes: This behaviour is still present in iOS 6.1.
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!