내 UIImage에서 발생하는 누수가 있다고 생각합니다. 사실,내 UIImage에서 누수를 찾지 못했어요
// Create and posit the UIImage
image = [UIImage imageWithData:[NSData dataWithContentsOfURL:url]];
NSLog(@"retain count 1 : %i", [imageView retainCount]);
imageView = [[UIImageView alloc] initWithImage:image];
NSLog(@"retain count 2 : %i", [imageView retainCount]);
//[imageView setImage:image];
//[imageView initWithImage:image];
imageView.frame = CGRectMake(0,64,320,367);
NSLog(@"retain count 3 : %i", [imageView retainCount]);
[self.view addSubview:imageView];
NSLog(@"retain count 4 : %i", [imageView retainCount]);
[imageView release];
NSLog(@"retain count 5 : %i", [imageView retainCount]);
NSLog(@"-----------------------");
그 코드가 줘 ...이 다운로드 한 이미지를 많이하고 나는 새로운 사진을 다운로드 할 때, 그것은 기존의 상단 보였다 있다고 생각하고 이전 출시 할당 해제되지 않았거나 그 결과는 :
retain count 1 : 0
retain count 2 : 0
retain count 3 : 1
retain count 4 : 1
retain count 5 : 2
retain count 6 : 1
-----------------------
retain count 1 : 0
retain count 2 : 0
retain count 3 : 1
retain count 4 : 1
retain count 5 : 2
retain count 6 : 1
-----------------------
retain count 1 : 0
retain count 2 : 0
retain count 3 : 1
retain count 4 : 1
retain count 5 : 2
retain count 6 : 1
-----------------------
분명히, 이미지가 발표 된 단지 1가,하지만 ... 분명히 ...
하면 화면에 더 많은 사진을, 어떻게 휴대 전화의 화면에 여전히 나이가있는 경우 나는 더 오래된 그림을 풀어 놓을 수 있냐?
내 질문을 읽어 주셔서 감사합니다 !!!
의 이미지 속성을 설정해야합니다! – clement