ARC로 마이그레이션하려고하는데이 오류가 발생합니다. 이 일을 해결 : 자동 참조 카운팅 문제 : ARC으로 허용되지 않는 '__unsafe_unretained 아이디 *'에 비 오브젝티브 C 포인터 타입 '무효 *'의 암시 적 변환 다음 Objective-C 포인터 유형이 아닌 'void *'에서 '__unsafe_unretained id *'로의 암시 적 변환이 ARC와 함께 허용되지 않습니다.
NSArray *itemsArray = nil;
__unsafe_unretained id *objArray = calloc (itemRange.length, sizeof (id)); //got the error here
[fdEntries getObjects:objArray range:itemRange]; //fdEntries is an NSMutableArray
itemsArray = [NSArray arrayWithObjects:objArray count:itemRange.length];
free(objArray);
는 오류입니다.
도움 주셔서 감사합니다.
- 당신이 객체의 배열을위한'alloc'을 사용하지하려고? – deanWombourne