C# StructureMap ObjectFactory。是否重置内存泄漏?
下面是重现该问题的简单测试,这是整个项目中的单个类,没有其他引用:C# StructureMap ObjectFactory。是否重置内存泄漏?,c#,.net,memory-leaks,structuremap,C#,.net,Memory Leaks,Structuremap,下面是重现该问题的简单测试,这是整个项目中的单个类,没有其他引用: [TestFixture] public class ObjectFactoryTests { [Test] public void ResetMemoryLeak() { for (int i = 1; i < 1000; i++) { ObjectFactory.Reset(); if (i % 10 == 0)
[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));
}
}
}
}
有人知道可能是什么问题吗?看来升级到StructureMap 2.6.1解决了这个问题
498720
509668
...
794072
796952