Hi,
I am solving some memory leaks (caused by my own code) but also noticed something which seems to be an issue in Smartclient (not sure ofcourse).
If I have a daterange item in the filter editor then destroying the ListGrid keeps a global reference to the daterange item structure. See the code below. After calling destroy on the listgrid I still have a global reference: isc_DateRangeItem_1_dateRangeForm
In my own code I have a DateRangeDialog added as autochild to a filter textitem, but the DateRangeDialog does not get destroyed automatically either. Maybe related, maybe not..
A related issue I found is that if I explicitly ca ll destroy on the DateRangeDialog that I get a NPE, this because the Canvas.destroy calls clear, in the DateRangeDialog the clear tries to clear the value in the form, but the form has already been set to null at that point (as the whole structure is being destroyed).
gr. Martin
I am solving some memory leaks (caused by my own code) but also noticed something which seems to be an issue in Smartclient (not sure ofcourse).
If I have a daterange item in the filter editor then destroying the ListGrid keeps a global reference to the daterange item structure. See the code below. After calling destroy on the listgrid I still have a global reference: isc_DateRangeItem_1_dateRangeForm
Code:
isc.Button.create({ ID: "destroy", title: "Destroy", top: 120, autoFit: true, click: function () { grid2.destroy(); } }); // --------------------------------------------------------------------------------------- // Inline FilterEditor Example (MiniDateRangeItem) isc.Label.create({ contents: "FilterEditor (MiniDateRangeItem)", top: 280, width: "90%", height: 25, autoDraw: true, baseStyle: "exampleSeparator" }); // Create a ListGrid displaying data from the worldDS and also displaying a FilterEditor isc.ListGrid.create({ ID: "grid2", top: 330, width: 595, height: 100, dataSource: "worldDS", autoFetchData: true, showFilterEditor: true });
A related issue I found is that if I explicitly ca ll destroy on the DateRangeDialog that I get a NPE, this because the Canvas.destroy calls clear, in the DateRangeDialog the clear tries to clear the value in the form, but the form has already been set to null at that point (as the whole structure is being destroyed).
gr. Martin
Comment