【发布时间】:2010-03-03 10:16:40
【问题描述】:
这是重现问题的简单测试,这是整个项目中的单个类,没有其他参考:
[TestFixture]
public class ObjectFactoryTests
{
[Test]
public void ResetMemoryLeak()
{
for (int i = 1; i < 1000; i++)
{
ObjectFactory.Reset();
if (i % 10 == 0)
{
GC.Collect();
GC.WaitForFullGCComplete();
Console.WriteLine(GC.GetTotalMemory(true));
}
}
}
}
产量稳步增长:
498720
509668
...
794072
796952
有人知道可能是什么问题吗?
【问题讨论】:
标签: c# .net memory-leaks structuremap