Changeset 544


Ignore:
Timestamp:
08/05/06 13:54:50 (13 years ago)
Author:
mokhet
Message:

apply patch from ticket #825 fix slow unloading / repainting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r536 r544  
    67126712/** 
    67136713 * Release memory properties from object 
    6714  * @param {object} O (Object)  The object to free memory 
    6715  * @param (string} P (Property) The property to release (optional) 
     6714 * @param {object} object The object to free memory 
     6715 * @param (string} prop  The property to release (optional) 
    67166716 * @private 
    67176717 */ 
    6718 HTMLArea.free = function(O, P) 
    6719 { 
    6720   if ( O && !P ) 
    6721   { 
    6722     for ( var p in O ) 
    6723     { 
    6724       HTMLArea.free(O, p); 
    6725     } 
    6726   } 
    6727   else if ( O ) 
    6728   { 
    6729     // is the try...catch really required here ? 
    6730     try 
    6731     { 
    6732       // if it is the innerHTML property, just do nothing 
    6733       if ( P !== 'innerHTML' ) 
    6734       { 
    6735         // need to unhide TD cells before delete them or they will leak in IE 
    6736         if ( O[P] && O[P].tagName && O[P].tagName.toLowerCase() == 'td' ) 
    6737         { 
    6738           O[P].style.display = ''; 
    6739         } 
    6740         O[P] = null; 
    6741       } 
    6742     } catch(x) {} 
     6718HTMLArea.free = function(obj, prop) 
     6719{ 
     6720  if ( obj && !prop ) 
     6721  { 
     6722    for ( var p in obj ) 
     6723    { 
     6724      HTMLArea.free(obj, p); 
     6725    } 
     6726  } 
     6727  else if ( obj ) 
     6728  { 
     6729    try { obj[prop] = null; } catch(x) {} 
    67436730  } 
    67446731}; 
Note: See TracChangeset for help on using the changeset viewer.