博客> ARC forbids Objective-C objects in struct
ARC forbids Objective-C objects in struct
2018-05-21 03:02 评论:0 阅读:626 IT喃

struct objc_usertest { long age; NSString *name; // ARC }USER_TEST; ARC环境下,结构体使用objc对象的时候必须使用__unsafe_unretained

struct objc_usertest { long age; __unsafe_unretained NSString *name; }USER_TEST;

收藏
0
sina weixin mail 回到顶部