How to get notified before static variables are finalized
问题 When can i cleanup objects stored in static variables in C#? I have a static variable that is lazily initialized: public class Sqm { private static Lazy<Sqm> _default = new Lazy<Sqm>(); public static Sqm Default { get { return _default.Value; } } } Note : That i've just changed Foo to be a static class. It doesn't change the question in any way if Foo is static or not. But some people are convinced that there is no way that an instance of Sqm could be constructed without first constructing an