You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greg Parker, who works on the Objective-C Runtime at Apple.
dispatch_once_t must not be an instance variable. The implementation of dispatch_once() requires that the dispatch_once_t is zero, and has never been non-zero. The previously-not-zero case would need additional memory barriers to work correctly, but dispatch_once() omits those barriers for performance reasons.
Xcode 8.3 Beta 1 now has a new Analyzer Warning step which we found while working on Box integration for PSPDFKit's PDF Viewer for iOS: https://pdfviewer.io
I'll follow up with a PR that fixes this.
The text was updated successfully, but these errors were encountered:
BOXAPIMultipartToJSONOperation.m uses dispatch_once_t as an instance variable which does not work.
https://github.com/box/box-ios-sdk/blob/master/BoxContentSDK/BoxContentSDK/Operations/BOXAPIMultipartToJSONOperation.m#L368
This StackOverflow question is a surprisingly good an thorough analysis why this doesn't work:
http://stackoverflow.com/questions/13856037/can-i-declare-dispatch-once-t-predicate-as-a-member-variable-instead-of-static/19845164#19845164
Greg Parker, who works on the Objective-C Runtime at Apple.
Xcode 8.3 Beta 1 now has a new Analyzer Warning step which we found while working on Box integration for PSPDFKit's PDF Viewer for iOS: https://pdfviewer.io
I'll follow up with a PR that fixes this.
The text was updated successfully, but these errors were encountered: