UITextField is never deallocated after being allocated

Originator:kbashour
Number:rdar://36029264 Date Originated:13-Dec-2017 01:02 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:iOS 11.2
Classification:Serious Bug Reproducible:Always
 
Summary:
After allocating a UITextField, it's never deallocated (iOS 11.2)

Steps to Reproduce:
1. Run the sample project
2. Tap "Push" to push a new view controller, which allocates a label and text field
3. Pop the view controller by pressing the back button
4. Note that the custom deinits for ViewController and Label are printed, but the TextField deinit is never called. The object stays in memory. 

Expected Results:
After step (3), one would expect the TextField to be deallocated, and the console to print the statement in the deinit.

Actual Results:
The print statements in the deinit for ViewController and Label are printed, but not for TextField. The TextField is not deallocated.

Version:
iOS 11.2

Notes:

Comments

See http://www.openradar.me/36182782

The bug is even more serious than reported. The UITextField doesn't even have to be added to the view hierarchy or assigned to a variable, simply creating it without a retaining reference will cause it to be abandoned and never deallocated.

By Chris.Morse at Dec. 22, 2017, 2:10 p.m. (reply...)

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!