Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
147 views
in Technique[技术] by (71.8m points)

javascript的一个问题

图片.png
这个在init函数中生成的对象,到底在执行结束后被析构了还是绑定到window对象上面。
如果在window对象上,我查看window对象的属性是找不到的,
但是页面中这个对象又是保持状态的,我怎么找不到这个对象绑定在什么地方


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

你的问题是为什么对象没被释放? 你这个对象应该跟存在的DOM有交集,所以没释放,但存在与内存中。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...