/// <summary> /// /// </summary> private void assignment() { DisposableClass temp = d; temp.id = id++; temp.Dispose(); // ** }
public void DisposeWeakEventSubscription_OnDisposedObject_DoesNotThrow() { var disposableClass = new DisposableClass(); var subscription = new MvxWeakEventSubscription <DisposableClass>(disposableClass, "TestEvent", (s, e) => { }); disposableClass.Dispose(); subscription.Dispose(); }
private void GenerateUnusedDisposableData() { DisposableClass dc = null; m_References = new WeakReference[1]; try { dc = new DisposableClass(); m_References[0] = new WeakReference(dc); } finally { if (null != dc) { dc.Dispose(); } } GC.Collect(); }
public static void Start() { var disposableClass = new DisposableClass(); disposableClass.Dispose(); }