UIWebView contains all memory for loadRequest in iPad

I read about leakage issues in UIWebView. But my business is very simple, so I decided to go to a new question. When I try to load a file from the loadRequest method from WebView, the memorycontinues to grow if I look in Tools. But if I see leaks, there are no leaks in the devices.

I am using 4.3 sdk, so I think this should be the last problem.

I read this article. Why does UIWebView consume so much memory? and this article http://blog.techno-barje.fr/post/2010/10/04/UIWebView-secrets-part1-memory-leaks-on-xmlhttprequest

but nothing works for me.

@interface MyView: UIViewController <UIWebViewDelegate> {

IBOutlet UIWebView *webView;

}

@property (nonatomic, retain) IBOutlet UIWebView *webView;

========= inside my MyView class

@synthesize webView;

-(void)viewDidLoad {

    [super viewDidLoad];

    NSString *path = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@", pathString]];
    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:path]] ];

}

-(void)dealloc {

   [webView release];

}

Waiting for your answers.

Thanks in advance

+3
source share
1 answer

Have you tried registering the following delegate method?

- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
   NSLog(@"Error: %@", [error description]);
}   
0
source

All Articles