简体   繁体   中英

Memory warnings when loading UIWebView

I'm executing a request using ASIHTTPRequest . I'm then loading into a UIWebView the data I get in the response. Sometimes, when the amount of data is long, I get memory warnings followed by the app being killed, although I'm setting to nil the properties I don't need in didReceiveMemoryWarning .

I checked in Instruments that I don't have any memory leak.

I could find lots of posts about this issue, but I didn't find an answer. Is there a way to render the UIWebView partially, like the Mail app does when we're seeing a long email and scrolling fast, showing a checkerboard background while loading?

You could try saving you data to a file first, then pointing the UIWebView at it for loading. ASIHTTPRequest can also save a response directly to a file as it streams in.

How big is your data?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM