// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; namespace E { public class Program { private const int NOBJ = 12000000; private const int OBJSIZ = 60; private static void Test() { byte[][] b = new byte[NOBJ][]; for(int i = 0; i < b.GetLength(0); i++) { b[i] = new Byte[OBJSIZ]; } DateTime dt1 = DateTime.Now; for(int i = 0; i < b.GetLength(0); i++) { b[i] = null; } GC.Collect(); DateTime dt2 = DateTime.Now; Console.WriteLine((dt2 - dt1).TotalSeconds); } public static void Main(string[] args) { Test(); Test(); Test(); } } }