Skip to content
Browse files

removing special case for objects in clean(), removeEvents when clear…

…Attributes isn't available
  • Loading branch information...
1 parent 44fd28d commit e882373b6827b40aad8fe0dd908079f7a99ee138 @tomocchino tomocchino committed
Showing with 3 additions and 6 deletions.
  1. +3 −6 Source/Element/Element.js
View
9 Source/Element/Element.js
@@ -220,15 +220,12 @@ var get = function(uid){
//clean an element and free memory
var clean = function(item){
if (!item) return;
- if (Browser.Engine.trident && (/object/i).test(item.tagName)){
- for (var p in item){
- if (typeof item[p] == 'function') item[p] = $empty;
- }
- Element.dispose(item);
+ if (Browser.Engine.trident){
+ if (item.clearAttributes) item.clearAttributes();
+ else if (item.removeEvents) item.removeEvents();
}
var uid = item.uid;
if (!uid) return;
- if (item.clearAttributes) item.clearAttributes();
collected[uid] = storage[uid] = null;
};

0 comments on commit e882373

Please sign in to comment.
Something went wrong with that request. Please try again.