Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Memory leak in Browser component under IE
Memory leak in Browser component under IE [message #631440] Thu, 07 October 2010 14:43 Go to next message
Siarhei Navatski is currently offline Siarhei NavatskiFriend
Messages: 14
Registered: July 2009
Junior Member
Hi, I'm using rap 1.3 and found memory leak problem while using Browser component in Internet Explorer (v. 7 and 8 ).

Use case is the following:
1. create Browser component with URL to some static html page
2. display this component on UI by adding to some composite
3. browser loads html that create some big JS-object
4. dispose this Browser component from UI

As a result memory allocated by loaded html page is not disposed in Internet Exporer. It is disposed normally in FireFox and Chrome browsers.

As I see problem is related to disposing QooxDoo qx.ui.embed.Iframe object. It is not disposed correctly in Internet Explorer.

Can you suggest how to fix this problem?
Re: Memory leak in Browser component under IE [message #631607 is a reply to message #631440] Fri, 08 October 2010 07:55 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Siarhei,
could you provide more information how do you measure the leakage -
monitor the memory consumption in IE before and after the Browser widget
disposal??!! Maybe it's not a memory leak, but IE did not trigger the
garbage collection immediately after the disposal!!?? The best way to
check the memory leakage, is to run multiple create-visualize-dispose
cycles of Browser widget for a certain amount of time - let say 30 min.
Best,
Ivan

On 10/07/2010 5:43 PM, Siarhei Navatski wrote:
> Hi, I'm using rap 1.3 and found memory leak problem while using
> Browser component in Internet Explorer (v. 7 and 8 ).
>
> Use case is the following:
> 1. create Browser component with URL to some static html page
> 2. display this component on UI by adding to some composite
> 3. browser loads html that create some big JS-object
> 4. dispose this Browser component from UI
>
> As a result memory allocated by loaded html page is not disposed in
> Internet Exporer. It is disposed normally in FireFox and Chrome browsers.
>
> As I see problem is related to disposing QooxDoo qx.ui.embed.Iframe
> object. It is not disposed correctly in Internet Explorer.
>
> Can you suggest how to fix this problem?
Re: Memory leak in Browser component under IE [message #631636 is a reply to message #631607] Fri, 08 October 2010 09:31 Go to previous messageGo to next message
Siarhei Navatski is currently offline Siarhei NavatskiFriend
Messages: 14
Registered: July 2009
Junior Member
Hi Ivan.

I measure memory usage of Internet Explorer by using process explorer utility of Sysinternals company (http://www.sysinternals.com/).

I'm sure that measurement is performed correctly because I tested two use cases - with memory leak and without one and I see that in first case memory is not disposed, but in second - correctly disposed.

Here is the content of static html page that is loaded in Iframe:

< html > 
< head >
  < script >
    function doMem(){
      window.jsObject = [];
      for(var i = 0; i < 1024*1024; i++){
         window.jsObject[i] = "SOME_TEXT_CONTENT";
      }
    }
   </ script >
</ head >	
< body onload="doMem()" >
  MEM LEAK!
</ body >
</ html >


If in the desctruct function of my custom widget (similar to the Browser widget) I assign null to the jsObject then the jsObject is disposed correctly and there is no memory leak:

destruct : function() {
    this.getIframeNode().contentWindow.jsObject = null;
}


It means that there are no other references to jsObject except of the window object and because there is memory leak it indicates that window object is not disposed.

So it looks like there is a problem with disposing iframe window on QooxDoo side.

Can you suggest what can be done in this situation to avoid memory leak?
Re: Memory leak in Browser component under IE [message #631642 is a reply to message #631636] Fri, 08 October 2010 09:59 Go to previous message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
Hi.

I think you should file a bugzilla entry with all that information, and
we will see if this is something that can be solved in a universal way.

Greetings,
Tim

Am 08.10.2010 11:31, schrieb Siarhei Navatski:
> Hi Ivan.
>
> I measure memory usage of Internet Explorer by using process explorer
> utility of Sysinternals company (http://www.sysinternals.com/).
> I'm sure that measurement is performed correctly because I tested two
> use cases - with memory leak and without one and I see that in first
> case memory is not disposed, but in second - correctly disposed.
>
> Here is the content of static html page that is loaded in Iframe:
>
> < html > < head >
> < script >
> function doMem(){
> window.jsObject = [];
> for(var i = 0; i < 1024*1024; i++){
> window.jsObject[i] = "SOME_TEXT_CONTENT";
> }
> }
> </ script >
> </ head >
> < body onload="doMem()" >
> MEM LEAK!
> </ body >
> </ html >
>
> If in the desctruct function of my custom widget (similar to the Browser
> widget) I assign null to the jsObject then the jsObject is disposed
> correctly and there is no memory leak:
>
> destruct : function() {
> this.getIframeNode().contentWindow.jsObject = null;
> }
>
> It means that there are no other references to jsObject except of the
> window object and because there is memory leak it indicates that window
> object is not disposed.
> So it looks like there is a problem with disposing iframe window on
> QooxDoo side.
>
> Can you suggest what can be done in this situation to avoid memory leak?
Previous Topic:Patching rwt plugin
Next Topic:GC Captcha and all toher stuff
Goto Forum:
  


Current Time: Thu Apr 25 00:37:18 GMT 2024

Powered by FUDForum. Page generated in 0.04887 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top