2

I have an app that opens a stagewebview window on one of it's pages to display a few specifics websites. I'm in the process of performance optimizing it and I've seemed to hit a snag with the stagewebview pages.

On all of the other pages, after a few seconds of idling the memory/cpu usage drops back down to near starting levels, but if I open the stagewebview window it appears to permanently increase the memory/cpu usage by upwards of 30-40 MB, and garbage collection doesn't seem to be able to bring it back down.

This is what I'm using to clean it up:

myWebView.viewPort=null;                
myWebView.dispose();        
myWebView=null;     

There are no event listeners associated with it. Does anyone know if this is an inherent problem with stagewebview, or am I just doing something wrong?

user3071888
  • 83
  • 10

1 Answers1

0

We faced the Same issue with the mx:Html desktop component, the main reason for this that the dom tree is built and added to your app which increase the memory, we used the following trick (it helps alot but not remove all added memory):

myWebView.loadString("");//and for desktop myHtml.loadHtml("");

this way you clean the old dom tree and create an empty one with minimum resources, i believe they should add a new function for clean up, until then we can use this workaround, hope this help :).

Anas
  • 711
  • 7
  • 24
  • I'll do some tests to see how much it improves memory conservation. Thanks. – user3071888 Feb 23 '14 at 06:11
  • 1
    Unfortunately this hasn't had a noticeable impact on performance improvement, but since you told me exactly what's causing maybe I'll be able to find the solution still. – user3071888 Feb 24 '14 at 05:14