Example #1
0
        public static void Main(string[] args)
        {
            SimpleObj obj = new SimpleObj();

            for (int i = 0; i < 10000; i++)
            {
                obj.CreateMemoryLeakClassAndTryQuit();
                Thread.Sleep(500);
            }
            GC.Collect();
            GC.WaitForPendingFinalizers();
            GC.Collect();
            Console.WriteLine("Press <Enter> to continue.......");
            Console.ReadLine();
        }
Example #2
0
 public SimpleObj()
 {
     instance = this;
 }