1. #1
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,311
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default CompositeSprite destruction

    CompositeSprite destruction


    I do a lot of work with composite sprites. I simplified the current destroy() method, which also should be a little faster. I just skipped the getCount() call, which is not needed since first() will return null if there are no more sprites to be destroyed.

    Code:
    // current
    destroy: function(){
        var me = this,
            surface = me.getSurface(),
            item;
            
        if (surface) {
            while (me.getCount() > 0) {
                item = me.first();
                me.remove(item);
                surface.remove(item);
            }
        }
        me.clearListeners();
    }
    
    // modified
    destroy: function(){
        var me = this,
            surface = me.getSurface(),
            item;
            
        if (surface) {
            while (item = me.first()) {
                me.remove(item);
                surface.remove(item);
            }
        }
        me.clearListeners();
    }

  2. #2
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,311
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default


    Can we turn this into a ticket? This small change will improve performance and reduce code size.

  3. #3
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,311
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default Missing param

    Missing param


    ... and the 2nd param in the call to surface.remove is missing (still not fixed as of B2)

    Let's create a ticket, thank you

    Code:
    // modified
    destroy: function(){
        var me = this,
            surface = me.getSurface(),
            item;
            
        if (surface) {
            while (item = me.first()) {
                me.remove(item);
                surface.remove(item, true);
            }
        }
        me.clearListeners();
    }

  4. #4
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,311
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default


    I overrode the CompositeSprite.destroy method. Now that I'm actually destroying the sprites it takes a lot longer to destroy the group. This is bad, but we need to properly destroy the sprites.

    Code:
    Ext.define('wag.override.draw.CompositeSprite', {
        override: 'Ext.draw.CompositeSprite',
    
        destroy: function () {
            var me = this,
                surface = me.getSurface(),
                item;
    
            if (surface) {
                while (item = me.first()) {
                    me.remove(item);
                    surface.remove(item, true);
                }
            }
            me.clearListeners();
        }
    });

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