Pyja
8 Dec 2009, 5:37 AM
Hi,
found a memory leak using DatePicker (seen with IE6 & IE8).
After some code checking, i saw that 2 attributes were used :
- this.prevRepeater,
- this.nextRepeater
but in the beforeDestroy, we destroy inexisting attributes :
this.leftClickRpt,
this.rightClickRpt
I think these ones are older and had been renamed with prevRepeater & nextRepeater.
So, bugfixed in beforeDestroy by replacing with good names.
I think that at the end of the beforeDestroy, we must call the super.beforeDestroy, otherwise we don't respect hierarchy call and all super will be ignored
beforeDestroy : function() {
if(this.rendered){
if (this.keyNav){
this.keyNav.disable();
}
this.keyNav = null;
Ext.destroy(
this.prevRepeater,
this.nextRepeater,
this.monthPicker,
this.eventEl,
this.mbtn,
this.todayBtn
);
}
Ext.DatePicker.superclass.beforeDestroy.call(this);
}
found a memory leak using DatePicker (seen with IE6 & IE8).
After some code checking, i saw that 2 attributes were used :
- this.prevRepeater,
- this.nextRepeater
but in the beforeDestroy, we destroy inexisting attributes :
this.leftClickRpt,
this.rightClickRpt
I think these ones are older and had been renamed with prevRepeater & nextRepeater.
So, bugfixed in beforeDestroy by replacing with good names.
I think that at the end of the beforeDestroy, we must call the super.beforeDestroy, otherwise we don't respect hierarchy call and all super will be ignored
beforeDestroy : function() {
if(this.rendered){
if (this.keyNav){
this.keyNav.disable();
}
this.keyNav = null;
Ext.destroy(
this.prevRepeater,
this.nextRepeater,
this.monthPicker,
this.eventEl,
this.mbtn,
this.todayBtn
);
}
Ext.DatePicker.superclass.beforeDestroy.call(this);
}