开发者

UIWebview javascript leak?

I've posted about this before but have been struggling to come up with a solution.

Basically I have a HTML5/jQuery app within my iPad app. Every time I load an image into the UIWebView (HTML App) the overall allocations in the profiler increases by about 2MB each time. This sounds about right because the image is approx 2MB's. I am using the data notation in the tag to load a Base64 image.

i.e.

When I load a certain number of images (page turns) the app will crash.

The app is an ebook viewer, so when I turn to a new (not previously loaded in current session) the allocations increase. But, if I turn back to a previiously loaded page the allocations don't increase and the page loads quicker than a new one. Every page turn sends a request to the database so i'm beginning to 开发者_如何转开发think the leak isn't in the iOS and that it could be in the HTML5 app.

Any ideas on this? I guess there could just as easily be a leak in the HTML app as there could be in iOS. How do I go about debugging this?

Any ideas greatly appreciated.

Thanks


HTTP and WebKit likes to keep a local copy of resources, just in case you will need it again. This may be what you encounter.

Check the answers to this question: Is it possible to prevent an NSURLRequest from caching data or remove cached data following a request?


This was die an unfixable issue with iOS 4.

Issue resolved itself after upgrading to iOS5.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜