Sam*_*mui 0 memory-leaks objective-c
为什么这段代码会产生内存泄漏?
- (void)loadModalInfo
{
InformationScreenViewController *infoView = [[InformationScreenViewController alloc] init];
infoView.url = [[NSBundle mainBundle] URLForResource:@"NewPatientInfo" withExtension:@"html"]; // LEAKING
// [infoView setModalPresentationStyle:UIModalPresentationFormSheet];
[infoView setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[self presentModalViewController:infoView animated:YES];
[infoView release];
infoView = nil;
}
Run Code Online (Sandbox Code Playgroud)
我是使用仪器的新手,我无法弄清楚为什么代码泄漏.提前致谢.
| 归档时间: |
|
| 查看次数: |
178 次 |
| 最近记录: |