更多数据表是否会导致内存泄漏 [英] Does more data tables results in memory leak

查看:87
本文介绍了更多数据表是否会导致内存泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们



我的应用程序内存消耗不断上升。

稍后我们重新启动应用程序。池。我知道这不是解决方案。

当我们采取内存泄漏报告时。它说使用了906个数据表。



页面有一个网格视图,并加载了1000个数据。在网格视图中,我们有一个动态绑定的下拉框。由于数据表是在运行时创建的。



任何人都可以帮助我,这会影响性能或我需要检查的任何其他内容。

Dear friends

My application memory consumption is keep on rising.
Later we are restarting the app. Pool. I know it is not the solution.
When we taken the memory leak report. It says 906 data tables used.

Page is having a grid view and 1000 data loaded to it. In grid view we have a dropdown box which is dynamically binding. Since data table is created at runtime.

Can any one pl help me is it affects the performance or any other I need to check.

推荐答案

首先检查你的对象:你是否在你创建的实现IDisposable的所有内容上调用Dispose?如果没有,那么就开始吧!如果您正在创建DataTables,它们需要正确的Disposal才能释放MarshalByValueComponent所使用的资源,并且无法执行此操作意味着这些资源将被捆绑,直到垃圾收集器被激发以释放它们。由于这可能不是一段相当长的时间,这可能是你泄密的一个原因。


我们不能为你这样做,我害怕 - 我们无法访问您的代码!
Start by checking your objects: are you calling Dispose on everything you create that implements IDisposable? If not, then start by doing that! If you are creating DataTables, they require correct Disposal in order to release the resources used by the MarshalByValueComponent from which they are derived, and failure to do that means that those will be tied up until the Garbage Collector is fired up to release them. Since that may not be for some considerable time, this may be one source of your leaks.

We can't do that for you, I'm afraid - we don't have access to your code!


这篇关于更多数据表是否会导致内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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