NSUserNotificationCenter's delegate not weak

Originator:keithbsmiley
Number:rdar://19464151 Date Originated:1/13/2015
Status:Open Resolved:
Product:OS X SDK Product Version:10.10.1
Classification:Other Bug Reproducible:Always
 
NSUserNotificationCenter assigns it's delegate leading to crashes.

Steps:

Set a temporary object as the NSUserNotificationCenter delegate, present the notification, exit the scope so the object is deallocated, the app crashes.

Expected:

The deallocation of the weak delegate should make it become nil and messaging nil shouldn't crash the app.

Actual:

The deallocation of the assigned delegate crashes the app.

Sample project: http://cl.ly/ZI9K

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!