简体   繁体   中英

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.

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. 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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