- (oneway void)release OBJC_ARC_UNAVAILABLE;

今天突然好奇 oneway void 到底是个神马东东,然后就开始查

- (oneway void)release OBJC_ARC_UNAVAILABLE;~~~

把 oneway void 写成 void,就得到了如下的警告:
![屏幕快照 2017-05-23 15.20.40.png](http://upload-images.jianshu.io/upload_images/1084403-d5cf4e1fd2486c3f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

改回来 - (oneway void)release 之后,警告消失,是这样说的:oneway is used with the distributed objects API, which allows use of objective-c objects between different threads or applications. It tells the system that it should not block the calling thread until the method returns. Without it, the caller will block, even though the method's return type is void. Obviously, it is never used with anything other than void, as doing so would mean the method returns something, but the caller doesn't get it. 

你可能感兴趣的:(- (oneway void)release OBJC_ARC_UNAVAILABLE;)