Array에 사용자 지정 개체 데이터를 저장했습니다. 함수의 사용자 정의 객체 배열에서 데이터를 가져옵니다. 처음으로 함수를 호출 할 때 제대로 작동하지만 반복해서 호출 할 때 EXC_BAD_ACCESS가 표시됩니다.EXC_BAD_ACCESS 커스텀 개체에서 데이터를 가져 오는 중 오류가 발생했습니다.
여기에 함수 세부 정보가 나와 있습니다.
-(void) facebookDisplayFunction:(int)atIndex {
FacebookWallData *wall = (FacebookWallData *)[facebook_wallDataArray objectAtIndex:atIndex];
NSString *friendID= wall.actor_id;
NSString *linkFetch= wall.permalink;
NSString* postID=wall.postId;
NSNumber *countNumber;
NSString *[email protected]"";
NSString* [email protected]"";
for(int i=0; i< [facebook_LikesArray count];i++) {
FacebookLikes* countValues=[[FacebookLikes alloc]init];
countValues=[facebook_LikesArray objectAtIndex:i];
// NSLog(@" postId_wall %@ LikePostId = %@",postID,countValues.PostID);
if([postID isEqualToString:countValues.PostID]) {
countNumber=countValues.Count;
if(countNumber>0)
friendID=countValues.Friends;
[countValues release];
break;
}
[countValues release];
}
for(int i=0;i< [facebook_FreindsArray count];i++) {
FacebookFreinds* friendsRecord=[[FacebookFreinds alloc]init];
friendsRecord=[facebook_FreindsArray objectAtIndex:i];
if([friendID isEqualToString:friendsRecord.UID]) {
friendName=friendsRecord.name;
profileThumImage=friendsRecord.pic_smal;
[friendsRecord release];
break;
}
[friendsRecord release];
}
// Adding values in table //
[imageData addObject:@"facebook.png"];
[tableList addObject:wall.messages];
[profileUserName addObject:friendName];
[linksOfFacebookData addObject:linkFetch];
[RetweetAndLikeData addObject:@"5"];
[favedProfileThumb addObject:profileThumImage];
[twitterPostID addObject:@""];
[eachPostUID addObject:friendID];
[wall release];
}
을 그리고 여기이 함수를 호출하고있다. [self facebookDisplayFunction : 0]; [self facebookDisplayFunction : 0]; // 여기에 EXC_BAD_ACCESS 오류가 있습니다. 당신은 줄에 오류가 발생하는 경우
예 지금 작동 중입니다. –