views:

233

answers:

1

I use UIWebView to display many type of file on iPhone.

Everything look good except with a PowerPoint file. After the PPT is displayed, there are many Leaks are shown. When I clicked on 1 of leaks, I got this:

Responsible Library: Foundation and Responsible Caller: -[NSCFString appendFormat:]

Does anyone met this problem before ? Thanks for helping me.

A: 

Is this through the device or the simulator?

Alex Reynolds
It leaks on both device and simulator. I'm sure that this leak is not from my code. My code to display PPT document: [myWebView loadRequest:[NSURLRequestrequestWithURL:[NSURLfileURLWithPath:tempFilePath]]]; I tried to replace that code with this to prevent leak but the document does not display [myWebView loadData:[NSDatadataWithContentsOfFile:tempFilePath]MIMEType:self._mimetypetextEncodingName:@"UTF-8"baseURL:nil];
Tùng Đỗ
When you release the web view (cf. https://devforums.apple.com/message/9526#9526 on how to do this properly) do the leaks go away? How big are the leaks?
Alex Reynolds