dhx.ui.views

I have noticed that dhx.ui.views was containing references to component id’s that were contained in windows that were closed. It appears that closing a ‘window’ component was not removing the children component ‘id’ references from the dhx.ui.views object. As a result, excess memory is being used. (Since there are also references to DOM elements, as a result they then cannot be GC either.)

It appears that the destructor function is not taking into consideration that for a ‘window’ component, there is not a ‘_cells’ array but a ‘_body_cell’ and a ‘_head_cell’.

One suggestion to correct this issue is by adding the following two lines of code in the destructor routine. Starting after line: 2484

if (this._body_cell) { this._body_cell.destructor(); }
if (this._head_cell) { this._head_cell.destructor(); }

Thanks,
Kris

PS - DHTMLX Touch is a great library. It is a pleasure to work with. :slight_smile: I am looking forward to the next release.

Hi Kris,

you are right - there is an issue with window destructor().
Thank you again!