通过COMCTL32.DLL过多的内存使用量时,CheckBox控件的Visible为真 [英] Excessive memory usage by comctl32.dll when a checkbox control's Visible becomes true

查看:209
本文介绍了通过COMCTL32.DLL过多的内存使用量时,CheckBox控件的Visible为真的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将控件添加到Windows窗体运行时在C#.NET应用程序中。每个这些控件交互的特定信号,并使用一些数据从该信号 - 信号名称,描述,源,单位,值等

I am adding controls to a Windows Form during runtime in a C# .NET application. Each of these controls interacts with a particular signal and uses some data from that signal -- signal name, description, source, units, value, etc.

这些管制对他们的复选框。如果只是这些信号中的一个复选框的Visible属性为真,我的应用程序的提交内存跃过800MB。没有任何其他数百个信号有问题。

These controls have a check box on them. When the Visible property of the checkbox of just one of these signals becomes true, my application's Committed memory jumps over 800MB. None of the other hundreds of signals have the problem.

我用的工具DebugDiag资料得知COMCTL32.DLL被分配805.45兆字节。特别是:

I used the DebugDiag tool to learn that comctl32.dll is allocating 805.45 MBytes. In particular:

  • 在功能c​​omctl32_72380000!CCHeapAllocArraySize + 3A
  • 分配类型堆分配(S)
  • 在堆处理0xf37893cd
  • 分配次数1分配(S)
  • 分配大小803.20兆字节
  • 在泄漏概率16%

应该是什么我的下一个故障排除步骤?什么工具可以帮助?

What should be my next troubleshooting steps? What tools can help?

更新: 我找到了问题的家长控制System.Windows.Forms.TrackBar。轨道酒吧的最大超过200,000,000。当我的最大下降100,000,000,它使用了大约一半的存储器。设置最大围绕百万使用的内存更合理的数量。

Update: I tracked the problem to a System.Windows.Forms.TrackBar on the parent control. The track bar had a maximum over 200,000,000. When I decreased the maximum to 100,000,000, it used about half the memory. Setting the maximum around 1,000,000 used a more reasonable amount of memory.

推荐答案

我找到了问题的家长控制System.Windows.Forms.TrackBar。轨道酒吧的最大超过200,000,000。当我的最大下降100,000,000,它使用了大约一半的存储器。设置最大围绕百万使用的内存更合理的数量。

I tracked the problem to a System.Windows.Forms.TrackBar on the parent control. The track bar had a maximum over 200,000,000. When I decreased the maximum to 100,000,000, it used about half the memory. Setting the maximum around 1,000,000 used a more reasonable amount of memory.

在checkbox.Visible扔我。看来,应用程序被创建控制和在点checkbox.Visible成为真正的内存,但该复选框本身无关的问题。

The checkbox.Visible threw me off. It appears that the applications was creating the control and the memory for it at the point the checkbox.Visible became true, but the checkbox itself had nothing to do with the problem.

这篇关于通过COMCTL32.DLL过多的内存使用量时,CheckBox控件的Visible为真的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆