Memory leak in UIPresentationController

Number:rdar://36256721 Date Originated:3/01/18
Status:Duplicated Resolved:
Product:UIKit Product Version:11.2
Classification:Memory Leak Reproducible:Yes
Any call to .presentationController for root controller in app (assigned to rootViewController property of main window) causes memory cycle between:

Steps to Reproduce:
1. Set any root controller
2. Call .presentationController
3. Replace root controller
4. Old controller still being hold by its presentation controller

Expected Results:
There should not be cycle in this case. UIKit assumes root controller never to change, but this can happen sometimes.

Actual Results:
UIPresentationController should be removed after transition


You're right, this one looks the same:

By serhii.zabrodko at Jan. 5, 2018, 3:47 p.m. (reply...)

Duplicates which probably duplicates

By artem.loenko at Jan. 5, 2018, 2:59 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!