/// ------------------------------------------------------------------------------------ /// <summary>Releases this instance. To only be used when application is exiting. /// Tried using the Application.ApplicationExit event, but the timing of this was /// wrong in some cases. /// </summary> /// ------------------------------------------------------------------------------------ public static void Release() { if (s_container != null) { s_container.DisposeSingletons(); } s_container = null; }
/// ------------------------------------------------------------------------------------ /// <summary>Releases this instance. To only be used when application is exiting. /// Tried using the Application.ApplicationExit event, but the timing of this was /// wrong in some cases. /// </summary> /// ------------------------------------------------------------------------------------ public static void Release() { s_container?.DisposeSingletons(); s_container = null; }