Bugzilla – Bug 318652
[ANONYMOUS METHODS] More anonymous helper classes than needed are created
Last modified: 2008-06-19 17:03:24 UTC
---- Reported by bmaurer@users.sf.net 2005-08-04 13:48:43 MST ---- Consider class X { delegate void D (); static void Main () { bool b = false; bool bb = false; D d = delegate { b = true; }; D dd = delegate { b = true; bb = true; }; d (); dd (); } } We create .class nested assembly auto ansi '<>AnonHelp<0>' and .class nested assembly auto ansi '<>AnonHelp<1>' creating two helper objects in the method. However, Microsoft only creates one. This increases performance by reducing the number of dereferences. ---- Additional Comments From miguel@ximian.com 2007-01-01 03:53:56 MST ---- The code was redone, but it likely still generates more helper classes than needed. Unknown operating system unknown. Setting to default OS "Other".
Fixed in SVN.