0
なぜこのコードはメモリリークを引き起こしていますか?この短い関数のメモリリーク
- (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;
}
私はInstrumentsを使用して新しく、なぜコードが漏れているのかわかりません。 ありがとうございます。
InformationScreenViewControllerのurlプロパティは何ですか? – csano
私はそれがおそらく – Odys
NSURLだと思いますか?奇妙な。私はそれが方法だと確信しています... – sidyll