프로젝트를 ARC로 변환 중입니다.
프로젝트에서 구조를 사용하고 있습니다.
은 ARC
내가 SO에서 검색구조체에서 __unsafe_unretained를 사용하는 방법
ARC forbids Objective-C objects in structs or unionsrk - type definition for struct
로 변환하는 동안 그것은 나에게 오류를주고 내가 __unsafe_unretained
.IT를 사용하여 문제를 해결할 수 있음을 발견했다. 그래서 저는 그것을 제 구조에서 사용했습니다.
typedef struct Grade{
__unsafe_unretained NSString *Table,
*RowId,
*ScheduleID,
*Level,
*Label,
*Thershold;
char *CreateStmt;
} grade;
이 노력하고 있지만 지금은 *RowId
에 다음 행에서 같은 오류를 보이고있다.
내 질문에 모든 변수 앞에 __unsafe_unretained를 넣어야합니까? 그렇게하는 것이 안전할까요? 또는이를 수정하는 또 다른 방법이 있습니다.
참조 this stackoverflow.com/questions/8093099/arc-forbids-objective-c-objects-in-structs-or-unions-despite-marking-the-file-f – Tirth
http://stackoverflow.com/questions/8093099/arc-forbids-objective-c-objects-in-structs-or-unions-marking-the-file-f –
나는 그렇게하고있다. 하지만 내 질문은. 이런 식으로 사용하는 것이 안전할까요? 모든 변수 앞에 __unsafe_unretained를 넣는 것과 같은가? – KDeogharkar