lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
245 stars 17 forks source link

01415049200022: Memory leak created switching between different UITextField widgets with/without SecureTextEntry #21306

Open openradar-mirror opened 5 years ago

openradar-mirror commented 5 years ago

Description

This memory leak is reproducible 100%. XCode version: 10.3 (10G8) iOS Simulator: iPhone 8 - iOS 12.4.

Steps to reproduce:

  1. Create a new iOS "Single View App" project on XCode
  2. Create a xib file containing just one UITextField. We called it "FormInputView.xib"
  3. Create a swift class associated to this custom widget (FormInputView.swift)
  4. Add 2 FormInputView inside the unique ViewController in Main.storyboard
  5. Bind one FormInputView inside ViewController.swift file and call it "secureInputView"
  6. In "viewDidLoad" method write this code: "secureInputView.inputTextField.isSecureTextEntry = true"
  7. Profile it (Product -> Profile)
  8. Enter into the first UITextField (0 memory leaks)
  9. Enter into second UITextField (1 memory leak)
  10. And if we go on to switch focus between the 2 UITextFields, new memory leaks will be created

Important things to note: