while the function in '.on' and '.un' are identical, they are not the
*same* function, thus the '.un' does not really remove the listener,
and we have leftover references to the grid which means it will never
really garbage-collected
instead, use '.mon' on the grid, which automatically cleans up the
listeners
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
var ws = me.up('pveStdWorkspace');
ws.selectById(record.data.id);
},
- destroy: function() {
- rstore.un("load", () => updateGrid());
- },
},
columns: rstore.defaultColumns(),
});
me.callParent();
updateGrid();
- rstore.on("load", () => updateGrid());
+ me.mon(rstore, 'load', () => updateGrid());
},
});