0

In my app I do have a UIwebview which is behaving quite well in regards of memory management.

When I open a video that is embedded into a website (this,specifically: http://bit.ly/1jT0OSE) - memory consumption goes up to 300 MB. I dont have any influence on the contents that is being shown.

When the webview (ARc) is closed again, only a part of it seems to be fully removed from memory.

If I stop close the webview before the video is fully played, Im able to recover a large part of the memory - but the longer it plays, the worse it gets.

I tried all the tricks and tips floating around SO, especially re caching but didnt get too far yet.

Am I missing something fundamental here?

idplanter
  • 160
  • 2
  • 9

2 Answers2

0

I'm not don't sure but maybe you need just release your webview or load an empty html string?

[webView loadHTMLString:@"<html><head></head><body></body></html>" baseURL:nil];

See this theme

Community
  • 1
  • 1
melvas
  • 2,346
  • 25
  • 29
0

There is no, as I know, clean solution, but you may try remove the video element from webView with Java script JavaScript: remove element by id before using all known hacks to release memory allocated by uiwebview.

Community
  • 1
  • 1
sage444
  • 5,661
  • 4
  • 33
  • 60