Is this object-lifetime-extending-closure a C# compiler bug?
问题 I was answering a question about the possibility of closures (legitimately) extending object-lifetimes when I ran into some extremely curious code-gen on the part of the C# compiler (4.0 if that matters). The shortest repro I can find is the following: Create a lambda that captures a local while calling a static method of the containing type. Assign the generated delegate-reference to an instance field of the containing object. Result: The compiler creates a closure-object that references the