Console.WriteLine("Object: " + x);
}
+ static void Inner () {
+ X t1 = test();
+ System.GC.Collect();
+ System.GC.Collect();
+ System.GC.WaitForPendingFinalizers();
+ test2(t1);
+ }
+
static int Main() {
try {
- X t1 = test();
- System.GC.Collect();
- System.GC.Collect();
- System.GC.WaitForPendingFinalizers();
- test2(t1);
+ Inner ();
} catch (TypeLoadException e) {
Console.WriteLine ("got correct exception: {0}", e);
return 0;