GCIntermediateReference
using System;
namespace DotNext.Runtime
{
internal sealed class GCIntermediateReference : WeakReference
{
internal GCIntermediateReference(object obj)
: base(obj, obj is IGCCallback)
{
}
internal void Clear()
{
object target = Target;
if (target != null) {
(target as IGCCallback)?.StopTracking();
try {
Target = null;
} catch (InvalidOperationException) {
}
}
}
}
}