public void RemoveReference(ObjectReference @ref) { ReferenceSystem().RemoveReference(@ref); // setting the ID to minus 1 ensures that the // gc mechanism does not kill the new YapObject @ref.SetID(-1); Platform4.KillYapRef(@ref.GetObjectReference()); }
public virtual void SetObjectWeak(ObjectContainerBase container, object obj) { if (_object != null) { Platform4.KillYapRef(_object); } _object = container.NewWeakReference(this, obj); }