If a DOM Element is removed, are its listeners also removed from memory?

后端 未结 6 1774
北荒
北荒 2020-11-22 06:18

If a DOM Element is removed, are its listeners removed from memory too?

6条回答
  •  时光说笑
    2020-11-22 06:55

    Yes, the garbage collector will remove them as well. Might not always be the case with legacy browsers though.

提交回复
热议问题