Neseek77 / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
1 stars 1 forks source link

Removing PieChart from parent widget leaves elements in detached DOM tree #529

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release: 1.1.1

Platform information: OS X 10.9, Chrome 31.0.1650.57, GWT 2.5.1.  Unknown if 
this problem exists on other platforms.

After adding a PieChart to a widget (for example, a VerticalPanel or as a new 
Tab in a TabPanel) and then removing the PieChart (using 
HasWidgets.remove(widget) or IndexedPanel.remove(index)), the PieChart no 
longer appears within the enclosing widget as expected.

However, when I check Chrome Dev Tools Containment view, I can see that 
elements for the PieChart remain behind in a detached DOM tree, instead of 
being garbage collected.

No workaround at present.

No relevant Google Group posts, but you can check out a sample project that 
demonstrates this behavior here: https://github.com/akydd/GWT-experiments.  

The PieChart add/remove functionality is in this presenter: 
https://github.com/akydd/GWT-experiments/blob/master/src/main/java/demo/client/p
resenter/Presenter2.java

Original issue reported on code.google.com by ak...@ualberta.net on 20 Nov 2013 at 11:51

Attachments:

GoogleCodeExporter commented 9 years ago
Not sure if this issue exists in Firefox, but in 25.0.1 for OS and GWT as 
above, about:memory shows 7,761,272 bytes in orphan-nodes with the code on 
Github, after adding and removing the PieChart.

When a Label is added/removed, the orphan-node byte count is only 3,392 B.

Original comment by ak...@ualberta.net on 21 Nov 2013 at 6:23