- Timestamp:
- 07/24/07 14:47:27 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Xul_XedLib/chrome/content/scenarixedlib/core/xed.js
r9384 r9392 394 394 return (sPropertyName in pNode) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; 395 395 }, false); 396 return vTw.firstChild(); 396 var vRes = vTw.firstChild(); 397 vTw = null; //memLeak 398 return vRes; 397 399 } 398 400 return null; … … 1291 1293 } 1292 1294 vEditor.setFocusFrom(vFirstNode); 1293 } 1295 delete this.fFrag; 1296 } 1297 } 1298 XEDInsertHisto.prototype.destroy = function(){ 1299 if(this.fFrag) xed.destroyBindings(this.fFrag); 1294 1300 } 1295 1301 … … 1329 1335 } 1330 1336 1337 XEDReplaceHisto.prototype.destroy = function(){ 1338 xed.destroyBindings(this.fOldBind.parentNode ? this.fNewBind : this.fOldBind); 1339 } 1331 1340 1332 1341 //************************************************************************************** … … 1716 1725 return vS+"]"; 1717 1726 } 1727 1728 xed.destroyBindings = function(pNode) { 1729 if(!pNode) return; 1730 function callDestroy(pNode){ 1731 try { 1732 if("destroy" in pNode) pNode.destroy(); 1733 } catch(e){xed.debug("destroyNode failed : "+pNode.localName+"\n"+e);} 1734 return NodeFilter.FILTER_ACCEPT; 1735 } 1736 callDestroy(pNode); 1737 var vTw = pNode.ownerDocument.createTreeWalker(pNode, NodeFilter.SHOW_ELEMENT, callDestroy, false); 1738 while(vTw.nextNode()); 1739 vTw = null; //memLeak 1740 } 1741 1718 1742 /** Protège les -- par des -~- et plus généralement -(X)~- par -(X+)~- pour les commentaires imbriqués. */ 1719 1743 xed.escapeComment = function(pText){
Note: See TracChangeset
for help on using the changeset viewer.