Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Memory leak while refreshing row in TreeGrid

$
0
0
Hi!
When I call refreshRow() on TreeGrid object it causes memory leak.
I've tested it in latest versions of Firefox/Chrome/IE and with all latest SmartGWT versions (e.g. v5.0p_2015-03-09/LGPL). In every case effect is the same.

SmartGWT code causing memory leak in browser:
Code:

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.RepeatingCommand;
import com.smartgwt.client.widgets.tree.Tree;
import com.smartgwt.client.widgets.tree.TreeGrid;
import com.smartgwt.client.widgets.tree.TreeNode;

public class Test implements EntryPoint {
        public void onModuleLoad() {
                final TreeGrid treeGrid = new TreeGrid();
                Tree tree = new Tree();
                TreeNode root = new TreeNode();
                root.setName("Root");
                tree.setRoot(root);
                treeGrid.setData(tree);
                treeGrid.setShowRoot(true);
                treeGrid.draw();

                Scheduler.get().scheduleFixedPeriod(new RepeatingCommand() {
                        @Override
                        public boolean execute() {
                                treeGrid.refreshRow(0);
                                return true;
                        }
                }, 1);
        }
}


Viewing all articles
Browse latest Browse all 4756

Trending Articles