我可以强制垃圾收集器收集特定对象吗?

时间:2014-12-23 07:24:58

标签: c# garbage-collection

我可以强制CG收集未使用的特定对象或不被任何其他对象引用吗?

像这样:

for (int i = 0; i < properties.Count(); i++)
{
    EntityProperties[i].Dispose();

    //Like this
    //GC.Collect(EntityProperties[i]);
}

0 个答案:

没有答案
相关问题