Managing memory bursts when loading local (Office and iWork) files in UIWebView

I use UIWebView to open local Office file formats (ppt, xls, doc) and iWork (numbers, pages, key) that are less than 5 MB in size. To download them, I just do:

NSURL *url = [NSURL fileURLWithPath:filepath]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; [myWebView loadRequest:requestObj]; 

When loading some of these files into a web view (especially ppts with a large number of images in them), the memory usage increases to almost 35 MB, which leads to the failure of my application. I have looked through various iOS forums, but have not really found a solution. Uses loadData: MIMEType: textEncodingName: baseURL: help save memory space or any other tricks to use UIWebView?

+6
memory-management ios ios4 uiwebview
source share
1 answer

This should not be the case for collapse. An application using 35 MB of RAM is not too much. I suggest you run a static analyzer for leaks. Also, what type of accident do you get? Do you see memory alerts issued just before the crash?

0
source share

All Articles