jQuery 1.5 Memory leak in IE8

后端 未结 1 408
有刺的猬
有刺的猬 2021-01-16 12:52

I believe I may have found a fairly simple leak in the latest release of jQuery.

var  listen = function(){};
var testLeak = function(){
    for(var i = 0; i&         


        
相关标签:
1条回答
  • 2021-01-16 13:05

    Turns out, if a closure-based memory leak is made (as it is in my example with "var item = {};"), detachevent will not signal that the javascript/DOM circular reference has been broken. You HAVE to null the reference to the element manually. Why the call to remove() seems to get things into this state was never determined

    0 讨论(0)
提交回复
热议问题