我有两个 uiviewcontroller,我正在释放 dealloc 中的所有资源,并在 didunload 中将它们设置为 nil,但是当我遇到两个 viewcontroller 时,内存仍在不断增加。
我正在跟踪这篇文章中使用的内存和释放内存
谁能建议为什么会这样?
这是第二个视图控制器:
- (void)viewDidUnload {
adView.delegate = nil;
[self setCountDown:nil];
[self setUploadPhoto:nil];
[self setBackclicked:nil];
[self setInfo:nil];
[self setCloseButton:nil];
[self setHow2usebg:nil];
[self setHow2useInstruction:nil];
[self setHow2useicon:nil];
[self setVc1:nil];
[self setVc:nil];
adView = nil;
[super viewDidUnload];
}
-(void)dealloc
{
[adView release];
[closeButton release];
[how2usebg release];
[how2useInstruction release];
[how2useicon release];
[videoRecorder1 release];
[uploadPhoto release];
[countDown release];
[backclicked release];
[info release];
[vc release];
[talkingImage release];
[backgroundImage release];
[super dealloc];
}