堆内存不断增加
当启动应用程序时,应用程序会慢慢消耗越来越多的内存。我试图找出为什么会发生这种情况,但还没有很成功。
我们的 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?
Many Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论