massive memory leak in ios UIWebView -


looking mem leaks elsewhere in our system, created 20 mb web page meta refresh tag. idea move lot data through our datapath code confirm mem stability.

<html> <meta http-equiv="refresh" content="1"> <body> <div style="border: 1px solid red">     content loading </div><!-- 20mb worth of comments --> </body> </html> 

what found uiwebview displaying meta refresh page leaks memory very, fast. app memory hits 300mb in 2 minutes , gets shot on low mem warning, when our code not in play.

i have stopped refresh loading , tried dealloc webview.

i have tried loadurl:"about:blank", loadhtml:"", javascript document close.

i tried writing recursive removefromsuperview , removefromparentviewcontroller, reading private scrollview in webview memory problem, memory never freed. can't seem find reliable way close, dealloc webview when done it.

we have lived slow rate of webview leaking quite while , want find way of assuring webview can cleaned when done it. converted app arc did not change memory rate.

i considering trying recursive loop through objects in webview , see if can freed. instruments shows 20 mb of cfdatas, alive, each refresh of 20mb page, not show them leaks. if deliver response header , done urlprotocol client run stably ale confirm memleaks in rest of data path, such dramatic test case result hoping find webview mem leak solution once , all.

does 1 have better ideas or has tried recursing through objects in uiwebview?

the way got rid of uiwebview's memory leakage setting html empty string. 1 place when view controller containing web view disappears:

- (void) viewwilldisappear:(bool)animated {     if (self.ismovingfromparentviewcontroller) {         [self.wv loadhtmlstring: @"" baseurl: nil];     } } 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -