- When the CLR unloads an application domain, it runs the finalizers on all objects that have a finalizer method in that application domain. When the CLR shuts down, it starts the finalizer thread on all objects that have a finalizer method. The <xref:System.Environment.HasShutdownStarted%2A> property returns `true` only after the finalizer thread has been started. When the property returns `true`, you can determine whether an application domain is being unloaded or the CLR itself is shutting down by calling the <xref:System.AppDomain.IsFinalizingForUnload%2A?displayProperty=nameWithType> method. This method returns `true` if finalizers are called because the application domain is unloading or `false` if the CLR is shutting down.
0 commit comments