1. #1
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    88
    Answers
    3
    Vote Rating
    5
    whirling dervish is on a distinguished road

      0  

    Default Answered: Correct way to dispose of / delete a load mask?

    Answered: Correct way to dispose of / delete a load mask?


    So I have been playing with loading masks for my application and currently I am using .hide(), but it seems like the loading mask object will just remain attached to the associated component and accumulate over time.

    I am unsure of how I should be disposing of loading masks, or even if I need to dispose of them in the first place.

  2. There is the potential for a leak here if you aren't careful. Hiding a loadmask won't destroy it, so if you keep creating and hiding loadmasks they'll leak. This type of leak is quite common with menus too, where hiding is often automatic but destruction isn't.

    Personally I try to use the setLoading method where possible:

    http://docs.sencha.com/ext-js/4-1/#!...hod-setLoading

    If you can't use that for some reason then you'll probably need to manage loadmask destruction yourself. Depending on your circumstances this may be as simple as calling destroy instead of hide.

    When I'm trying to test leaks I generally poll the value of:

    Code:
    Ext.ComponentManager.getCount();
    If you have a component leak it'll be reflected in that count.

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,580
    Answers
    540
    Vote Rating
    314
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      1  

    Default


    There is the potential for a leak here if you aren't careful. Hiding a loadmask won't destroy it, so if you keep creating and hiding loadmasks they'll leak. This type of leak is quite common with menus too, where hiding is often automatic but destruction isn't.

    Personally I try to use the setLoading method where possible:

    http://docs.sencha.com/ext-js/4-1/#!...hod-setLoading

    If you can't use that for some reason then you'll probably need to manage loadmask destruction yourself. Depending on your circumstances this may be as simple as calling destroy instead of hide.

    When I'm trying to test leaks I generally poll the value of:

    Code:
    Ext.ComponentManager.getCount();
    If you have a component leak it'll be reflected in that count.

  4. #3
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    88
    Answers
    3
    Vote Rating
    5
    whirling dervish is on a distinguished road

      0  

    Default


    Thanks, that is really helpful.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi