1
一般來說,我通過創建委託的指針調用我的其他類視圖,然後通過下面的鏈接調用其他類: -在iPhone中調用其他類視圖的最佳方式?
第一種方式: -
Mydelegate *ptr = (Mydelegate *)[[UIApplication sharedApplication]delegate];
[self.navigationController pushViewController:ptr.NextClasspointer animated:YES];
第二種方法: -
創建該類的一個指針,它ü要撥打: -
NextClass *nextptr = [[NextClass alloc]initWithnibName:@"NextClass" bundle:nil];
[self.navigationController pushViewController:nextptr animated:YES];
[nextptr release];
nextptr = nil;
這上面兩種方法我一般使用,但我的問題是日在哪一個是最適合大項目,以便我的堆棧問題將被刪除我的意思是內存問題將被解決。並且 是有必要釋放指針的第一和第二種情況是我釋放的方式是正確還是錯誤
請幫助我 在此先感謝