在我的项目中,我使用的是arc,但我仍然面临内存问题。可以告诉我如何删除它们吗?
-(IBAction)familyHistoryBtnClicked:(id)sender
{
FamilyHistoryViewController *FamilyViewController=[[FamilyHistoryViewController alloc]initWithNibName:@"FamilyHistoryViewController" bundle:nil];
FamilyViewController.view.frame = CGRectMake(0, 50 , 809, 748);
FamilyViewController.view.tag=112;
[self removeSubview:112];
[self.view addSubview:FamilyViewController.view];
}
-(IBAction)pastMedicalHistoryBtnClicked:(id)sender
{
MedicalHistoryViewController *medicalViewController=[[MedicalHistoryViewController alloc]initWithNibName:@"MedicalHistoryViewController" bundle:nil];
medicalViewController.view.frame = CGRectMake(0, 50 , 809, 748);
medicalViewController.view.tag=113;
[self removeSubview:113];
[self.view addSubview:medicalViewController.view];
}