2 // This test is from Nigel Perry, Bugzilla #77060
4 // The issue here was that in the past we used to emit the
5 // Scope initialization on first use, which is wrong as illustrated
6 // in this test (the shared scope is not initialized for differnt
9 // This test is a running test, ensuring that it runs
11 #region Using directives
14 using System
.Collections
;
24 public delegate void DoCopy();
28 public void Leak(bool useArray
, int max
)
36 { work
= new int[max
];
41 one
= delegate { int xans = (max + 1) * max / 2; }
;
44 Console
.WriteLine("Here goes...");
46 Console
.WriteLine("... made it");
51 { static void SpaceLeak()
52 { Space s
= new Space();
54 Console
.WriteLine(s
.Value
);
58 Console
.WriteLine(s
.Value
);
61 public static void Main(string[] args
)