Ignore:
Timestamp:
07/24/07 14:47:27 (5 years ago)
Author:
sys
Message:

memLeaks : ajout de la méthode destroy() pour compenser l'absence d'appel des destructor des XBL si les éléments ont été extraits du Document.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Xul_XedLib/chrome/content/scenarixedlib/libUiBase/widgets/xedUiInputs.xbl.xml

    r9384 r9392  
    318318                </content> 
    319319                <implementation> 
    320                         <field name="fInputField">document.getAnonymousElementByAttribute(this, "anonid", "input")</field> 
    321320                        <property name="filtercr" onget="return this.getAttribute('filtercr')!='false'" onset="this.setAttribute('filtercr', val); return val;"/> 
    322321                        <property name="filterspaces" onget="return this.getAttribute('filterspaces')!='false'" onset="this.setAttribute('filterspaces', val); return val;"/> 
     
    324323                        <property name="filterSpecialCars" onget="return this.getAttribute('filterSpecialCars')!='false'" onset="this.setAttribute('filterSpecialCars', val); return val;"/> 
    325324                        <constructor> 
     325                                if(this.fInputField) this.destroy(); //Nouvel appel constructor, gestion memLeaks 
     326                                this.fInputField = document.getAnonymousElementByAttribute(this, "anonid", "input"); 
    326327                                //Surcharge de la property value pour court-circuiter la sérialisation et la suppression des espaces inseccables. 
    327328                                this.fInputField.__defineGetter__("value", this.__valueGetter); 
     
    330331                                this.fInputField.controllers.insertControllerAt(0, this.fXEDInputController); 
    331332                        </constructor> 
    332                         <destructor> 
    333                         try{ 
    334                                 this.fXEDInputController.destroy(); 
    335                                 this.fXEDInputController = null; 
    336                                 this.fInputField.controllers.removeControllerAt(0); 
    337                         }catch(e){xed.debug("destructor:::::::"+e);} 
    338                         </destructor> 
     333                        <destructor>this.destroy();</destructor> 
     334                        <method name="destroy"> 
     335                                <body> 
     336                                        this.fXEDInputController.destroy(); 
     337                                        this.fXEDInputController = null; 
     338                                        this.fInputField.controllers.removeControllerAt(0); 
     339                                </body> 
     340                        </method> 
    339341                        <method name="__valueGetter"> 
    340342                                <body> 
Note: See TracChangeset for help on using the changeset viewer.