Open
Conversation
此throttle函数存储了最后一次触发事件时的参数arguments和context,导致如果后续不再触发此事件,那么上一次触发事件时的dom以及组件都无法被内存回收。 比如在vxe-table中,触发mouse-wheel后表格会被缓存,后面及时销毁了表格,其内存也无法被释放。当然因为mouse-wheel事件是注册在window上的,在空白区域再次滚动鼠标滚轮,内存就会得以释放。
|
@xuliangzhan 大佬 这个能处理一下吗?今天排查到WheelEvent确实会导致内存溢出 |
@xuliangzhan 大神关注一下这个? 只是左右滑动,开启了虚拟滚动 vxe-table v3.6.13 PS: 似乎是在keep-alive下会出现 |
|
怎么解决的,也遇到了同样的问题,不过用的是v 4.5.22版本 |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

此throttle函数存储了最后一次触发事件时的参数arguments和context,导致如果后续不再触发此事件,那么上一次触发事件时的dom以及组件都无法被内存回收。
比如在vxe-table中,触发mouse-wheel后表格会被缓存,后面即使销毁了表格,其内存也无法被释放。当然因为mouse-wheel事件是注册在window上的,在空白区域再次滚动鼠标滚轮,内存就会得以释放,但是新的内容又会被缓存,再关闭另一个表格或者其他组件,内存同样无法被回收。