简体   繁体   English

未指定“分配”,“保留”或“复制”属性-假定为“分配”

[英]No 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed

That line gives me a warning in the source code 该行在源代码中给我警告

@property (nonatomic) dispatch_queue_t queue;

No 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed 未指定“分配”,“保留”或“复制”属性-假定为“分配”

My project is non-ARC and I cannot change it at the moment. 我的项目是非ARC,目前无法更改。

How do I fix the warning? 如何解决警告? (nonatomic, assing)? (非原子的)

The system needs any of those 3 attributes, if none is present, it will assume it's assign the chosen one. 系统需要这3个属性中的任何一个,如果不存在任何属性,则将假定它assign了选定的属性。 If you write (nonatomic, assign) it will work exactly the same way it's working now so, if it's working o, go ahead and write assign . 如果您编写(nonatomic, assign) ,它将完全按照现在的方式工作,因此,如果正常运行,请继续编写assign

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM