views:

10

answers:

0

I am trying to do like this, with the commented lines it works good, without, when I came back from the "pushed" view my App just crashes... when should I [release]? Or, better, I am doing this correctly?

if (indexPath.row == 1) {
        Credits *cr = [[Credits alloc] initWithNibName:@"Credits" bundle:nil];
        [self.navigationController pushViewController:cr animated:YES];
        //[cr release];
    }else{
        Search *sr = [[Search alloc] initWithNibName:@"Search" bundle:nil];
        [self.navigationController pushViewController:sr animated:YES];
        //[sr release];
    }

related questions