public override bool Equals(object obj) { if ((object)this == obj) { return(true); } bool fResult = false; PythonWeakReference wr = obj as PythonWeakReference; if (wr != null) { object ourTarget = target.Target; object itsTarget = wr.target.Target; GC.KeepAlive(this); GC.KeepAlive(wr); if (ourTarget != null && itsTarget != null) { fResult = Ops.IsTrue(RefEquals(ourTarget, itsTarget)); } } GC.KeepAlive(this); return(fResult); }
public static List GetWeakRefs(object @object) { return(PythonWeakReference.GetWeakRefs(@object)); }
public static int GetWeakRefCount(object @object) { return(PythonWeakReference.GetWeakRefCount(@object)); }