Possible jQuery memory issues with $('#foo').remove() ?

I've just discovered that when the remove() function is used, the matched elements are not removed from the jQuery object, just the DOM. According to the [remove() documentation][1]: > Removes all matched elements from the > DOM. This does NOT remove them from > the jQuery object, allowing you to use > the matched elements further. Surely if a web app keeps on adding and removing elements from the dom, this will keep using up more and more memory? Can someone confirm if this is the case? What can be done to avoid this? [1]: http://docs.jquery.com/Manipulation/remove#expr

以上就是Possible jQuery memory issues with $('#foo').remove() ?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏