InitViewControllerとSettingsViewControllerの2つのコントローラーがあります。各ビューには、別のビューを呼び出すボタンがあります。
InitViewController
@interface InitViewController : UIViewController
- (IBAction)loadSettings:(id)sender;
@end
@implementation InitViewController
- (IBAction)loadSettings:(id)sender {
SettingsViewController *vc = [[SettingsViewController alloc] initWithNibName:@"SettingsViewController" bundle:nil];
[self presentViewController:vc animated:YES completion:nil];
vc = nil;
}
@end
SettingsViewController
@interface SettingsViewController : UIViewController
- (IBAction)back:(id)sender;
@end
@implementation SettingsViewController
- (IBAction)back:(id)sender {
InitViewController *vc = [[InitViewController alloc] initWithNibName:@"InitViewController" bundle:nil];
[self presentViewController:vc animated:YES completion:nil];
vc = nil;
}
@end
アプリケーションをプロファイリングし、ボタンを何度もタップしてテストしているときに、InitViewControllerとSettingsViewControllerのインスタンスがまだ生きていることを確認しました=>
私は何が間違っているのですか?