You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue you've described involves a potential memory leak in the upsert method within base-shape.ts of the antvis/G6 library. The problem arises when the key value of a shape changes during rendering, causing previously existing elements in the shapeMap to remain uncleared.
To address this issue, a possible solution would be to modify the upsert method to ensure that elements in the shapeMap are properly cleared or updated when their keys change. This would prevent old shapes from persisting in memory.
Would you like me to search for any existing solutions or related discussions in the repository? If you need further assistance or want to explore potential code modifications, please let me know!
Describe the bug / 问题描述
base-shape.ts中的upsert函数只关心新增或已存在的shape,如果渲染过程中shape的key值发生变化,已存在于 shapeMap 上的元素无法被清空
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
当每次渲染的shape的className不是相同的,上次渲染的shape就会常驻在shapeMap中,无法被删除和更新
Version / 版本
🆕 5.x
OS / 操作系统
Browser / 浏览器
The text was updated successfully, but these errors were encountered: