堆内存不断增加

发布于 2024-12-07 20:29:44 字数 553 浏览 1 评论 0原文

当启动应用程序时,应用程序会慢慢消耗越来越多的内存。我试图找出为什么会发生这种情况,但还没有很成功。

我们的 WPF 客户端获取从服务器推送的数据。后端采用 C++ 语言,数据被推送到我们的 C# 模型中,并通过 ViewModel 向下连接到 DataGrid。

经过一段时间的不活动后,我可以看到堆内存和大堆大小无缘无故地不断增加。好吧,数据被推入,所以也许这就是原因,但在 2 小时 15 分钟后,不必要增加的内存再次被释放,只是再次缓慢增加。

在图表的右侧(超过 24 小时后),我加载了更多选项卡和更多数据,因此数量大幅增加,但从那时起就不再释放内存了。

该图显示 System.Windows.EffectiveValueEntry[] 占用了最多的内存。据我了解,这个类与 WPF 依赖对象相关。但我不知道是什么原因造成的。我不希望内存下降,因为我没有关闭任何东西。但为什么会涨成这样呢?

可能是什么原因?

在此处输入图像描述

非常感谢,

When starting the application, the application consumes slowly more and more memory. I am trying to figure out why this is happening and haven't been very successful yet.

Our WPF client gets the data pushed in from the server. The backend is in C++ and the data gets pushed into our C# model and wired down through the ViewModels up to the DataGrid.

After a while of inactivity though, I can see that the heap memory and the Large Heap Size keep increasing for no reason. Well the data is pushed in, so maybe this is the reason but after 2 hours and 15 min the unnecessarily increased memory is freed up again, just to go slowly up again.

On the right side of the graph (after over 24 hours), I have loaded even more tabs and more data, hence the massive increase but from then on there is no freeing up of memory anymore.

The Graph is showing that System.Windows.EffectiveValueEntry[] is taking the most memory. From my understanding this class is related to the WPF dependency objects. But I have no idea what could be causing this. I am not expecting the memory to go down, as I am not closing anything. But why is it going up like this?

What could be the cause?

enter image description here

Many Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文