Closed allenye0909 closed 2 months ago
env:
blockStack?和我的情况有点类似。https://github.com/liangqi2510/vue-block-study 不知道能不能帮到你。
感谢回复,@liangqi2510 是有点类似, @yyx990803 已经处理了,或者是我使用方式不正确,那应该怎么使用呢?
https://github.com/vuejs/core/pull/3106#issuecomment-807584522
我觉得你的情况和我类似,是因为 blockStack 正常情况下,在每次渲染后应该是空的。我现在还不确定你和我遇到的相同的情况。我可以详细说一下我的情况,和我解决的方式。
我遇到的情况是,我在使用element-puls的table组件的自定义 col 的 slot。但我插槽部分内的模版是有问题的,特定情况下,会产生异常。但这个异常被这个插槽所在的渲染函数(table-column)捕获,使 vue 框架没有捕获这个异常(正常应该由vue框架进行处理参考)。渲染过程也继续执行,但blockStack没有正常被清空。
我清理掉了我模版部分的错误,内存泄漏就消失了。你可以在控制台,把遇到异常暂停和遇到未捕获的异常勾选上,进行调试,看看能不找到这类异常。
补充一个我的截图
@liangqi2510 确实是类似。 “我清理掉了我模版部分的错误,内存泄漏就消失了”,方便贴一下修改的代码示例和修改后代码示例吗?
代码不太方便,可以举个例子 {{row.userData.name}} -> {{row?.userData?.name}}
VUE_HMR_RUNTIME
only exists in dev mode. Make sure to only report memory leaks that happen in production mode, and make sure to provide actual reproductions.
There's nothing we can do without reproductions.
Vue version
3.4.21
Link to minimal reproduction
none (stand-alone software)
Steps to reproduce
hooks/layout.ts
What is expected?
Locate What causes memory leaks,WHY?High probability is the question I use!!
Who can save me
What is actually happening?
When I get a task, I cache the task list and task details using pinia,Switch tasks and cache different task details
System Info
Any additional comments?
No response