예제 #1
0
        public void GC1()
        {
            WeakReference r = null;

            using (var jc = new JSContext())
            {
                var a = new { };
                r       = new WeakReference(a);
                jc["a"] = jc.Convert(a);
                a       = null;
            }

            System.GC.Collect();
            System.GC.WaitForPendingFinalizers();

            // Assert.False(r.IsAlive);
        }