linux-packaging-mono/mono/tests/finalize-parent.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

25 lines
307 B
C#

using System;
class P {
static public int count = 0;
~P () {
count++;
}
}
class T : P {
static int Main () {
for (int i = 0; i < 100; ++i) {
T t = new T ();
}
GC.Collect ();
GC.WaitForPendingFinalizers ();
Console.WriteLine (P.count);
if (P.count > 0)
return 0;
return 1;
}
}