.destroy () in MooTools, version 1.2.4:
destroy: function(){
Element.empty(this);
Element.dispose(this);
clean(this, true);
return null;
}
The clean (item, save) function executes .removeEvents()if the browser needs it:
var clean = function(item, retain){
....
if (item.clearAttributes){
var clone = retain && item.cloneNode(false);
item.clearAttributes();
if (clone) item.mergeAttributes(clone);
} else if (item.removeEvents){
....
};
You must be safe by freeing items.
In addition, the credit for the entire code above is for MooTools, of course: http://mootools.net/
source
share