Changing NSSplitViewItem's viewController creates zombie

Originator:k.misiura
Number:rdar://17959235 Date Originated:08/08/2014
Status:Closed Resolved:02/09/2014
Product:OS X SDK Product Version:
Classification: Reproducible:
 
Summary:
Changing view controller for NSSplitViewItem, while it's not added to NSSplitViewController, overreleases old NSSplitViewItems view controller.

Attached example project.

Steps to Reproduce:
First example:
1. Run attached project on OSX 10.10 14A314h.

Second example:
1. Create NSSplitViewItem with view controller and add it to NSSplitViewController.
2. Remove NSSplitViewItem from NSSplitViewController.
3. Set new viewController for removed NSSplitViewItem.
4. Add NSSplitViewItem back to NSSplitViewController.

Expected Results:
No zombies and no crashes.

Actual Results:
Old view controller is overreleased and zombie crawls out of its tomb.

Version:
OS X 10.10 (14A314h)
Xcode Version 6.0 (6A279r)

Notes:


Configuration:


Attachments:
'SplitViewTest.zip' was successfully uploaded.

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!