I already found a lot of information on how to solve the memory leak problem for the iPhone Obj C code. The last two leaks puzzled me, I probably miss something. Maybe you can notice it.
The tools report 2 leaks for the following code (part of a subclass of UIViewController):
(1) UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0.0, 0.0, self.view.bounds.size.width, self.view.bounds.size.height - LOWER_VERT_WINDOW_MARGIN)]; (2) webView.scalesPageToFit = YES; (3) webView.dataDetectorTypes = UIDataDetectorTypeNone; (4) (5) NSURL *url = [NSURL fileURLWithPath:self.fullPathFileName isDirectory:NO]; (6) NSMutableURLRequest *urlRequest = [[NSMutableURLRequest alloc] initWithURL:url]; (7) [webView loadRequest:urlRequest]; (8) [urlRequest release], urlRequest = nil; (9) [self.view addSubview:webView]; (10) [webView release], webView = nil;
The device orders 128 bytes flow on line 1, as well as 256 bytes on line 4. I donβt know if this means line 3 or line 5.
Does anyone know what I'm missing?
source share