UISplitViewController retains itself and its master view controller in iOS 9 and 9.1

Originator:jonsibley
Number:rdar://23211892 Date Originated:Oct 22, 2015
Status:Closed Resolved:Yes
Product:iPad Air 2 Product Version:iOS 9.1
Classification: Reproducible:
 
Summary:
I've tested that the retain cycle does not exist in iOS 8.4, but does exist in iOS 9.1. I've put together a sample project to easily confirm whether or not UISplitViewController causes itself to leak (just run it and check the console output).

This also tests an attempt to allow the master and detail view controllers to be deallocated. As one can see, the master view controller still seems to be retained by the UISplitViewController even after it is removed from the UISplitViewController.viewControllers array property.

Steps to Reproduce:
1. Open my sample project
2. Run on the simulator or device for various iOS SDK versions

Expected Results:
I expect that UISplitViewController and its master view controller be released

Actual Results:
UISplitViewController is not released, and neither is its master view controller

Version:
iOS 9.1

Notes:
I'm discussing on this thread in the dev forums: https://forums.developer.apple.com/thread/15054

and here on StackOverflow: http://stackoverflow.com/questions/33271149/does-uisplitviewcontroller-have-a-retain-cycle-bug-in-ios-9/33271150?noredirect=1#comment54343301_33271150

Configuration:
iPad Air 2

Attachments:
'UISplitViewControllerRetainCycleTest.zip' was successfully uploaded.

Comments

From Apple Developer Relations:

I am not able to reproduce this on iOS 9.3. Please test in the iOS 9.3 beta.

I've subsequently closed the ticket, and marked it as resolved.

I've used the author's sample code posted on StackOverflow to create a sample project, available at https://cl.ly/231W3n0E3n27. Running this project in the iOS Simulator of your choosing and watching the response in the console logs is sufficient for determining if this bug exists on the iOS version running in the simulator.


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!