public static void Clear() { using (InstanceGetters.DisableProcessing()) { lock (ms_unloadMethods) { foreach (var unloadMethod in ms_unloadMethods) { unloadMethod(); } } InstanceGetters.Clear(); } }