Re: Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro
Re: Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro
- Subject: Re: Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro
- From: Quincey Morris <email@hidden>
- Date: Sat, 20 Feb 2016 23:20:56 -0800
- Feedback-id: 167118m:167118agrif8a:167118sARTnelEis:SMTPCORP
On Feb 20, 2016, at 23:07 , Ilya Kulakov <email@hidden> wrote:
>
> Checking version of the OS is the least problem. Providing an implementation is the actual one.
> I want to use weaks, because they are easier for developers who are tought by new documentation and didn't learn to explicitly nullify references to objects like delegate. Not saying that one would want to this logic in an app that targets newer versions of OS X.
Ah, I see.
Assuming the compiler version you’re using accepts ‘weak’, then that should function as a non-zeroing weak reference on OS X versions that don’t have support for zeroing. You could then document that clients targeting 10.6 must nullify the delegate before deallocating it, leaving the convenience of zeroing to more “modern” clients, without having to write any zeroing code yourself, or using any conditional code at compile time or run time.
(But check that this is actually feasible. I realize I might be confusing the old GC zeroing weak with ARC zeroing weak, if there’s a difference in effective functionality.)
_______________________________________________
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