コード例 #1
0
        public void DeactivateDoesNotRetainChild()
        {
            var child = new Screen();
            child.DeactivateWith(this.parent);

            var weakChild = new WeakReference(child);
            child = null;
            GC.Collect();

            ((IScreenState)this.parent).Deactivate();
            Assert.Null(weakChild.Target);
        }