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;
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;
本文标题:ARC forbids Objective-C objects
本文链接:https://www.haomeiwen.com/subject/kffduxtx.html
网友评论