[removed] should I worry about memory leaks in 2011?

后端 未结 5 1807
南笙
南笙 2021-01-30 11:32

The topic of memory leaks in JavaScript is not brought up often. However, I stumbled upon this article, written in 2007. The authors state:

Internet Explo

5条回答
  •  鱼传尺愫
    2021-01-30 12:19

    Well, people still use old versions of IE. So beware of circular references, because IE has severe problems with that. I believe the common mistake in that regard is to reference an HTML element in a closure that is inside an event handler to that element. Just set the variable referring to the element to null and it'll be fine.

提交回复
热议问题