📅  最后修改于: 2022-03-11 14:49:06.350000             🧑  作者: Mango
代码示例1
WeakReference ref2 = new WeakReference(new MyObject());
MyObject obj2;
if (ref2.TryGetTarget(out obj2))
{
DoSomething(obj2);
}