The .Net Concurrent BlockingCollection has a memory leak?

随声附和 提交于 2019-12-05 06:37:49

Yes I can confirm this. You aren't on .NET 4.5, are you? It is supposed to be fixed there (and your comments under this answer seem to confirm this).

Anyway, write yourself a wrapper around a DataTable and clear that wrapper when you are done with the table. That makes it eligible for GC. The wrapper will not be GC'ed early but it is tiny.

class Wrapper<T> { public T Item; }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!