public void RunMemoryLeakTest()
        {
            MemoryUsageLoadInstance();
            long mem = Process.GetCurrentProcess().PrivateMemorySize64;

            for (int i = 0; i < 20; i++)
            {
                MemoryUsageLoadInstance();
            }
            JavascriptContext.Collect();
            GC.Collect();
            GC.Collect();
            decimal diffMBytes = (Process.GetCurrentProcess().PrivateMemorySize64 - mem) / 1048576m;

            Assert.That(diffMBytes < 1, String.Format("{0:0.00}MB left allocated", diffMBytes));
        }
        public string RunMemoryLeakTest()
        {
            MemoryUsageLoadInstance();
            long mem = Process.GetCurrentProcess().PrivateMemorySize64;

            for (int i = 0; i < 20; i++)
            {
                MemoryUsageLoadInstance();
            }
            JavascriptContext.Collect();
            GC.Collect();
            GC.Collect();
            decimal diffMBytes = (Process.GetCurrentProcess().PrivateMemorySize64 - mem) / 1048576m;

            if (diffMBytes >= 1) // Allow 1 MB
            {
                return(String.Format("{0:0.00}MB left allocated", diffMBytes));
            }
            return(null);
        }