How do I track and debug JavaScript memory leaks in Firefox?

前端 未结 3 476
挽巷
挽巷 2020-12-09 10:23

I\'ve been trying to track this one for literally a month now without any success. I have this piece of code on an car advertising website which basically allows thumbnails

3条回答
  •  暖寄归人
    2020-12-09 11:06

    Try nulling elements variable array in the end of the initialize function

        ...
    
        if (ads.length > 0)
            {
            this.imagesFx = new Fx.Elements(elements,
                {
                wait: false,
                duration: 1000
                });
            this.moveNext.periodical(2500, this);
            }
    
        elements = null; //Add THIS!
    }
    

提交回复
热议问题