Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13961 closed defect (fixed)

Gird - formatter widget doesn't get destroyed which leads to significant leaks

Reported by: Evan Owned by: Evan
Priority: high Milestone: 1.7
Component: DojoX Grid Version: 1.7.0b1
Keywords: grid, formatter, widget, leak Cc: wangqsh@…, xwzhu@…
Blocked By: Blocking:

Description

This happens to all grid types including DataGrid?, EDG, TreeGrid? and LazyTreeGrid? - when formatter() is used to return widgets, all the widgets are not cleaned up when user keep scrolling or creating/destroying a grid instance, and this results into significant memory increase like 50M in a very shot time e.g. 10-15mins, this can be observed in the attached test case.

Attachments (2)

test_grid_leak.html (3.6 KB) - added by Evan 8 years ago.
Test case to reproduce the leaks when keep scrolling a grid instance
13961-leaks.png (2.8 KB) - added by Evan 8 years ago.
snapshot of the leaks

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by Evan

Attachment: test_grid_leak.html added

Test case to reproduce the leaks when keep scrolling a grid instance

Changed 8 years ago by Evan

Attachment: 13961-leaks.png added

snapshot of the leaks

comment:1 Changed 8 years ago by Evan

Cc: wangqsh@… xwzhu@… added; grid formatter widget leak removed
Keywords: grid formatter widget leak added

comment:2 Changed 8 years ago by Evan

Resolution: fixed
Status: newclosed

In [26619]:

Fixes #13961 !strict

  1. widget._destroyOnRemove should be used to ensure the widget get destroyed when a page is removed, e.g. function formatter(){

var w = new dijit.form.TextBox?({...});
w._destroyOnRemove = true;
return w;

}

  1. _View.js Ensure the widget nodes are not orphaned when a row/page is destroyed


  1. _Grid.js Ensure the correct sequence within Grid.destroy() so that widget nodes are not orphaned.


Thanks for the patch from Elvis(IBM, CCLA)/Oliver(IBM, CCLA)!

comment:3 Changed 8 years ago by Evan

In [26621]:

Refs #13961 !strict, remove obsolete spaces and ensure expandos get removed in LazyTreeGrid?.destroy()

comment:4 Changed 8 years ago by Evan

In [26625]:

Refs #13961 !strict, fix a regression, widget dom node shouldn't be removed without '_destroyOnRemove = true'

comment:5 Changed 8 years ago by Evan

In [26673]:

Refs #13961 !strict, backport fix of #13961 to 1.6 branch

Note: See TracTickets for help on using tickets.