On Fri, 6 May 2016 13:28:10 -0700, Jens Alfke said:

>> On May 6, 2016, at 1:03 PM, Matthew LeRoy <mle...@minitab.com> wrote:
>> 
>> My understanding is that NSTableView's delegate is a zeroing weak reference
>
>Are you sure? Historically it’s been unsafe_unretained — in the old days
>before weak references or ARC, the view never retained nor released the
>delegate. The type of crash you’re having was a not-uncommon bug.
>
>Apple may have upgraded the property to a proper zeroing weak reference,
>but I can’t tell from the docs.

I was going to say "no", because my bug's still open, but in fact I never filed 
one. :(  The following are still "open" (including their duped-to originals) 
though:

24046976 / 21380125 NSSplitView's delegate should be weak not assign
21366070 / 18987740 NSAnimation delegate should be 'weak' not 'assign'
17553217 NSSpeechRecognizer delegate should be 'weak' not 'assign'
17540574 NSToolbar's delegate should be 'weak' not 'assign'
17540533 NSWindow's delegate should be 'weak' not 'assign'
15301393 / 10520557 Support zeroing weak references (under ARC) with NSTextView

As for NSMenu, it came back: "Although the delegate is declared “assign” in 
NSMenu.h, it’s actually been weak (for weak-compatible objects) since 10.9."

When switching from GC to ARC, all this was a PITA.

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 s...@rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to