我正在使用“LIExposeController”来创建新的 UIViewControllers。这会带来一些我无法修复的内存警告。
- (UIViewController *)newViewControllerForExposeController:(LIExposeController *)exposeController {
UIViewController *viewcontroller = [[[MyViewController alloc] init] autorelease];
return viewcontroller; // warning here saying object with a + 0 retain count returned to caller where a + 1 (owning) retain count is expected
}
- (void)shouldAddViewControllerForExposeController:(LIExposeController *)exposeController {
[exposeController addNewViewController:[self newViewControllerForExposeController:exposeController]
animated:YES];
} // warning here saying potential leak of an object
LIExposeController *exposeController = [[[LIExposeController alloc] init] autorelease];
exposeController.viewControllers = [NSMutableArray arrayWithObjects:
[self newViewControllerForExposeController:exposeController],
nil]; // warning here saying potential leak of an object