I have a finalizer that seems to always fail during application shutdown. I think this is because it's holding onto some native resources that are no longer valid at that point. Is there a way to tell, in a destructor/finalizer, if it is being called due to an application shutdown?
Thanks!
System.Environment.HasShutdownStarted
Documentation here: http://msdn.microsoft.com/en-us/library/system.environment.hasshutdownstarted.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With