写真とモーションのあるブックのようなアプリケーションを開発しています。私は18ビューを持って、各ビューはより多くの実際のメモリ(最大70メガバイト)です。このコードの開発のイメージがある70MBのメモリと18のViewController sdk
画像:
fonsImatge = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"fons_pis.png", 0] ofType:nil]]];
[fonsImatge setFrame:CGRectMake(0, 0, 1024, 768)];
fonsImatge.alpha = 1.0f;
//[UIView commitAnimations];
[self.view insertSubview:fonsImatge atIndex:0];
[fonsImatge release];
letra_a = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"lletra_a_01.png"]];
[letra_a setFrame:CGRectMake(406, 114, 270, 318)];
[self.view insertSubview:letra_a atIndex:2];
[letra_a release];
letra_a.alpha = 0.0;
letra_a.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"lletra_a_01.png"],
[UIImage imageNamed:@"lletra_a_02.png"],nil];
letra_a.animationDuration = 5.00;
letra_a.animationRepeatCount = 1000;
[letra_a startAnimating];
次のビュー:
proj_lletrac_fosca *viewController = [[proj_lletrac_fosca alloc] init];
[self presentViewController:viewController animated:NO completion:nil];
[viewController release];
- (void)viewDidUnload {
self.fonsSemi=nil;
self.fletra_a=nil;
}
私は前のビューのメモリを削除するにはどうすればよいですか?
ありがとう!!!!
どのバージョンのXcodeを使用していますか?また、ARC(Automatic Reference Counting)を使用していますか? –
Xcodeが4.2.1、ARCを使用していません – adagio20
ARCはどうですか? –