[2019-12] [threads] Add back mono_threads_attach_tools_thread as a public API (#18074)
[mono-project.git] / mono / tests / finalize-parent.cs
blobb784b2346d6878c61c3165fa5e380310aa341498
1 using System;
3 class P {
5 static public int count = 0;
6 ~P () {
7 count++;
11 class T : P {
13 static int Main () {
14 for (int i = 0; i < 100; ++i) {
15 T t = new T ();
17 GC.Collect ();
18 GC.WaitForPendingFinalizers ();
19 Console.WriteLine (P.count);
20 if (P.count > 0)
21 return 0;
22 return 1;