应用程序批准是否需要超级dealloc

时间:2011-03-29 04:57:14

标签: iphone dealloc

如果我在课堂上不使用[super dealloc],我的iPhone应用程序是否会被批准?

这里我称之为下一个视图控制器。

-(void) thumbClicked:(id) sender {

//NSArray *temp = self.mediaRecords ;
UIButton *button = (UIButton *) sender;
if([self.mediaRecords count] > 0) {
    DetailViewViewController *detailView = [[DetailViewViewController alloc] initWithNibName:@"DetailViewViewController" bundle:nil];
    detailView.mediaArray = self.mediaRecords;
    detailView.mediaThumbs = mediaThumbs;
    detailView.currentThumbTag =  button.tag;
    detailView.tabType = currentTabType;
    detailView.hidesBottomBarWhenPushed = YES;

    detailView.navCon = navController;
    detailView.cell = self;

    detailView.currentCellFrame = self.frame; 
    [navController pushViewController:detailView animated:YES];
} else {
    [CarboUtil alertWithMessage:NO_DATA_MESSAGE];
}


[detailView release];

}

这是dealloc

- (void)dealloc {
    //
    LogInfo (@"Media Detail View Dealloc -- START");

    [navBar release];
    [shareView release];
    [toolBar release];
    //[category release];
    //[mediaThumbs release];
    //[mediaArray release];
    [storyWebView release];
    [buttonBorderArray release];

    [fontSizeButton release];
    [facebookButton release];
    [tweeterButton release];
    [emailButton release];
    [commentsButton release];
    [textonlyButton release];
    [saveButton release];
    [fbAgent release];
    [queue release];
    [mediaListData release];

    [super dealloc];
    LogInfo (@"Media Detail View Dealloc -- END");
}

但是在这种情况下dealloc永远不会调用,我必须手动释放视图,如果我这样做了manualy我在super dealloc

崩溃了

1 个答案:

答案 0 :(得分:4)

很可能,但这将是一件非常愚蠢的事情。您的应用程序可能会像筛子一样泄漏,这意味着您可能会收到大量内存警告,这意味着您的应用程序可能会非常崩溃。

换句话说,学习内存管理规则。它们并不复杂。