Memory Leak in PropertyGrid when Rearranging Controls
还没有人认领这个 Issue。
评估
调研方向
使用提供的 XAML 和大纲面板中的拖放步骤复现 Demo.XamlDesigner 中的内存泄漏。首先检查 PropertyGrid.Reload 以及相关的 PropertyNode 保留情况,然后比较注释掉 Reload 时的内存行为;当重复重新排列不再导致进程内存增长时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Hello,
I think I found a memory leak. Here are the steps to reproduce it on Demo.XamlDesigner:
- run Demo.XamlDesigner app
- in the XAML tab, paste the following code:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="640"
Height="480">
<Canvas>
<TabControl Width="304"
Height="167"
Canvas.Left="72"
Canvas.Top="132">
<TabItem />
<TabItem />
<TabItem />
<TabItem />
<CheckBox />
</TabControl>
<CheckBox Canvas.Left="157" Canvas.Top="233.04000000000002" />
<CheckBox Canvas.Left="242" Canvas.Top="208" />
<CheckBox Canvas.Left="157" Canvas.Top="173.04000000000002" />
<CheckBox Canvas.Left="234" Canvas.Top="158" />
<CheckBox Canvas.Left="116" Canvas.Top="208" />
</Canvas>
</Window>
- switch to Design view
- in the outline panel, drag and drop the tab items and check boxes onto each other randomly
- see the process memory consumption increase
Here is the screen recording video of this process.
If you comment out the PropertyGrid.Reload method body, the problem seems to disappear. This this might be PropertyNode - related. However, I was unable to track down the object retention problem to fix it.
- 主要语言
- C#
- 星标
- 1.1k
- 派生
- 281
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
icsharpcode/WpfDesigner 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 35/100
icsharpcode/WpfDesigner#121 ·
-
难度 4/5 3-5 天 新手友好度 35/100
icsharpcode/WpfDesigner#101 ·
-
难度 3/5 1-2 天 新手友好度 35/100
icsharpcode/WpfDesigner#92 ·
-
难度 4/5 3-5 天 新手友好度 30/100
icsharpcode/WpfDesigner#88 ·
-
难度 5/5 一周以上 新手友好度 25/100
icsharpcode/WpfDesigner#81 · 1 条评论 ·
查看 icsharpcode/WpfDesigner 的全部 Issue
相似的 Issue
-
type:task ux
难度 2/5 1-3 小时 新手友好度 72/100
elsa-workflows/elsa-foundation#5253 ·
维护者通常 1 天内回复