javascript memory leaks

后端 未结 5 624
天涯浪人
天涯浪人 2020-12-10 02:25

i am using jquery and doing something like this

DOM:

5条回答
  •  盖世英雄少女心
    2020-12-10 02:50

    Can't comment on the leakage problem but you could simply use .empty() instead of .html(''). That way you'd clean the innerHTML and remove any bound event handlers.

提交回复
热议问题