Closed kiinlam closed 8 years ago
原型中destroy方法并不是清理得很干净,这个方法目的只是清除部分事件绑定吗? 还有些地方可以处理: 1、自动播放计时器; 2、调用bind时增加的事件监听; 3、一些dom的引用,如outer、wrap;
你说的对,之前有issue提到单页应用中可能需要destroy,但是后续在应用中很少遇到这种场景,所以destroy方法一直没有更新。
我们评估一下是完善destroy还是干脆移除它
重复实例化的场景很少,但还是保留吧,清理工作还得彻底一点
计时器与eventhandle清理已添加
原型中destroy方法并不是清理得很干净,这个方法目的只是清除部分事件绑定吗? 还有些地方可以处理: 1、自动播放计时器; 2、调用bind时增加的事件监听; 3、一些dom的引用,如outer、wrap;