Re: Success with NSTableView weak delegates?
Re: Success with NSTableView weak delegates?
- Subject: Re: Success with NSTableView weak delegates?
- From: David Duncan <email@hidden>
- Date: Tue, 20 Sep 2016 14:26:27 -0700
> On Sep 20, 2016, at 1:21 PM, Sean McBride <email@hidden> wrote:
>
> Hi all,
>
> WWDC 2016 Session 203 "What's New in Cocoa" at around 43:37 in the video, says that if you link against the 10.11 SDK that NSTableView's delegate is weak. So I went and wrapped my delegate nil-ing in:
>
> #if MAC_OS_X_VERSION_MAX_ALLOWED < 101100
> [tableView setDelegate:nil];
> [tableView setDataSource:nil];
> #endif
>
> yet (with NSZombie especially), I easily reproduce message-to-zombie crashes with builds that are made against the Xcode 7.3.1 10.11 SDK.
On which OS version?
The macro above only says “do this if I link against an SDK prior to 10.11” – that doesn’t handle what happens at runtime when you are on 10.10 or below. In particular, if you plan to deploy back to prior to 10.11, then you would want to either do a runtime check, or for trivial code like this always run the code until your MIN_ALLOWED (deployment target) is >= 10.11.
>
> Anyone have success with these supposedly weak tableview delegates?
>
> Thanks,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng email@hidden
> Rogue Research www.rogue-research.com
> Mac Software Developer Montréal, Québec, Canada
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
--
David Duncan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden