메모리 누수로 코드를 정리하려고하는데 '릴리스'방법에 문제가 있습니다. 여기 좋은 iPhone 메모리 시민이 됨
내 코드입니다 : 내가 [DICT 자료] 위의 라인과 같은 문제를하지 않는 이유 때NSArray *dict = [[NSArray alloc] initWithContentsOfURL:url];
if (dict == nil) {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Error"
message:@"Cannot retrieve content. Please try again later."
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
return;
}
self.schedule = dict;
[dict release];
[url release]; //I receive a runtime error here, "BAD ACCESS"
이해가 안;
URL 할당 방법을 나타내는 코드를 게시 하시겠습니까? – marcc