I used several UIStoryboard in my app, but I found that when I changed the storyboard, the old did not released ,how to release the old one? the following is the code:
if([ModuleTeacher isEqualToString:type]){
[self loginStateChanged];
if([TeacherProfile getCurrentTeacher]!=nil){
[self startPull];
}
}else if([ModuleStudent isEqualToString:type]){
UIStoryboard *main = [UIStoryboard storyboardWithName:@"StudentMain" bundle:nil];
self.window.rootViewController = [main instantiateInitialViewController];
if([StudentProfile getCurrent]!=nil){
[self startPull];
}
}else if([ModuleOrgnization isEqualToString:type]){
UIStoryboard *main = [UIStoryboard storyboardWithName:@"OrganizeMain" bundle:nil];
self.window.rootViewController = [main instantiateInitialViewController];
[AppCache setModule:type];
}
this way the old storyboard will be never released.