How to destroy a JavaScript object?

后端 未结 5 1553
青春惊慌失措
青春惊慌失措 2020-12-07 17:16

Recently, I came across one of my application which consumes too much memory and increasing by 10 MB/sec.

So, I like to know the best way to destroy JavaScript objec

5条回答
  •  广开言路
    2020-12-07 17:49

    I was facing a problem like this, and had the idea of simply changing the innerHTML of the problematic object's children.

    adiv.innerHTML = " the original html that js uses 
    ";

    Seems dirty, but it saved my life, as it works!

提交回复
热议问题