Closed GoogleCodeExporter closed 8 years ago
Thanx for catching this problem - changes made.
Original comment by miroslav...@gmail.com
on 28 May 2008 at 8:46
THe fix has been made and looks like this. It is possible to change the actual
having
the element having bits sunk. The code caters for this. Please confirm.
protected void onDetach() {
Element element = this.getSunkEventsTarget();
if (0 != this.getSunkEventsBitMask()) {
element = this.getSunkEventsTarget();
} else {
elesment = this.getElement(); // prolly dont need but to be sure...
}
DOM.setEventListener(element, null );
super.onDetach();
}
Original comment by miroslav...@gmail.com
on 28 May 2008 at 8:52
Actually the bottom code is better please patch CompositeWidget and confirm...
/**
* The complement of onAttach. This method removes the event listener for
* the sunk event target.
*/
protected void onDetach() {
this.clearSinkEvents();
super.onDetach();
}
/**
* This method is called when a widget is deatached from the dom, cleaning up any
event listener references to avoid
* memory leaks in certain browsers.
*/
protected void clearSinkEvents(){
Element element = this.getSunkEventsTarget();
if (0 != this.getSunkEventsBitMask()) {
element = this.getSunkEventsTarget();
} else {
element = this.getElement(); // prolly dont need but to be sure...
}
DOM.setEventListener(element, null );
}
Original comment by miroslav...@gmail.com
on 28 May 2008 at 8:54
Original issue reported on code.google.com by
xsegr...@gmail.com
on 26 May 2008 at 9:00