VT-TizianoF
26 May 2010, 5:51 AM
I've just found a couple of memory leaks on extjs, using sIEve. I'm not really sure about the overrides, anyone can check them?
TableLayout doesn't have a destroy method:
Ext.override(Ext.layout.TableLayout, {
destroy : function() {
Ext.layout.TableLayout.superclass.destroy.call(this);
Ext.destroy(Ext.get(this.table));
}
});If you have a split region, the x-tool-expand-position tool isn't destroyed
Ext.override(Ext.layout.BorderLayout.Region, {
destroy : function() {
if (this.autoHideSlideTask && this.autoHideSlideTask.cancel) {
this.autoHideSlideTask.cancel();
}
if (this.collapsedEl && this.collapsedEl.dom && this.collapsedEl.dom.firstChild) {
Ext.destroy(Ext.get(this.collapsedEl.dom.firstChild));
}
Ext.destroy(this.miniCollapsedEl, this.collapsedEl);
}
});Don't know why, but without the red line the x-splitbar-proxy-position-v tool leaks on a border layout
Ext.override(Ext.SplitBar, {
destroy : function(removeEl) {
Ext.destroy(this.shim, Ext.get(this.proxy));
this.proxy = null;
this.dd.unreg();
if (removeEl) {
this.el.remove();
}
this.purgeListeners();
}
});
TableLayout doesn't have a destroy method:
Ext.override(Ext.layout.TableLayout, {
destroy : function() {
Ext.layout.TableLayout.superclass.destroy.call(this);
Ext.destroy(Ext.get(this.table));
}
});If you have a split region, the x-tool-expand-position tool isn't destroyed
Ext.override(Ext.layout.BorderLayout.Region, {
destroy : function() {
if (this.autoHideSlideTask && this.autoHideSlideTask.cancel) {
this.autoHideSlideTask.cancel();
}
if (this.collapsedEl && this.collapsedEl.dom && this.collapsedEl.dom.firstChild) {
Ext.destroy(Ext.get(this.collapsedEl.dom.firstChild));
}
Ext.destroy(this.miniCollapsedEl, this.collapsedEl);
}
});Don't know why, but without the red line the x-splitbar-proxy-position-v tool leaks on a border layout
Ext.override(Ext.SplitBar, {
destroy : function(removeEl) {
Ext.destroy(this.shim, Ext.get(this.proxy));
this.proxy = null;
this.dd.unreg();
if (removeEl) {
this.el.remove();
}
this.purgeListeners();
}
});