An active UISearchController in a UINavigationController leaks

Originator:siemens.craig
Number:rdar://34987551 Date Originated:13-Oct-2017 04:43 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:11
Classification:Serious Bug Reproducible:Always
 
Summary:
An active UISearchController in a UINavigationController the has another ViewController pushed over it is not deallocated when the UINavigationController is.

Steps to Reproduce:
Modally present a UINavigationController whose RootViewController uses a UISearchController
Make the UISearchController active
Push a new ViewController onto the UINavigationController
Dismiss the modally presented UINavigationController

The attached sample project contain these steps.
Works fine sequence: 1, 2a, Last
Leak sequence: 1, 2b, 3b, Last

On success, the console should contain "Success! SearchContentViewController.deinit was called"

Expected Results:
All the child view controllers of the UINavigationController to be released

Actual Results:
The view controller thats using the UISearchController is not released.

Version:
11

Notes:

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!