javierdotnet / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 3 forks source link

hide method of Field in a TabPanel cause memory leak #405

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add a Field (TextField for example) in a not active tab of a TabPanel
2. call the hide() method of the Field
3. Compile and open in browser
4. Open the task manager and see the leak
5. The leak stops when the tab containing the Field is shown

What is the expected output? What do you see instead?

expect stable memory occupation

What version of the product are you using? On what operating system?
XP
GWT-Ext 2.0.4, Ext 2.0.2, GWT 1.5.2
OS: XP SP3
Browsers : IE7, FF 3.0.1, Chrome Beta, Opera 9.27 

Please provide any additional information below.

public void onModuleLoad() {
        TabPanel tabPanel=new TabPanel();

        Panel firstPan=new Panel("First");
        tabPanel.add(firstPan);

        Panel secondPan=new Panel("Second");

        Field field=new TextField();

        field.hide();

        secondPan.add(field);

        tabPanel.add(secondPan);

        RootPanel.get().add(tabPanel);

    }

Original issue reported on code.google.com by xfrontli...@gmail.com on 7 Sep 2008 at 5:45

GoogleCodeExporter commented 9 years ago
This seems to be due to a recursive call and setting multiple 
deferredCommands...

Original comment by mlim1...@gmail.com on 20 Oct 2008 at 10:39

GoogleCodeExporter commented 9 years ago
hide() is fixed but show() not fixed yet.
BTW: The root cause is using DefferredCommand. Replace it with render event 
handler is a better way to fix this issue.

Original comment by louxiang...@gmail.com on 8 May 2013 at 1:37