2 using Mono.ObjectServices;
13 prints ("dd", new DD ());
14 prints ("short str", "short");
15 prints ("long str", "this is a longer string which we want to measure the size of");
17 object[] obj_array = new object [100];
19 prints ("obj array", obj_array);
21 for (int i = 0; i < 100; i++)
22 obj_array [i] = new Demo ();
24 prints ("obj array w/ demos", obj_array);
27 static void prints (string s, object x)
29 Console.WriteLine ("size of " + s + ":" + ObjectInspector.GetMemoryUsage (x));
35 object [] o = new object [10];
36 char [] ch = new char [10];