public void Dispose() { Log.Info("TS3AudioBot shutting down."); Bots?.Dispose(); Bots = null; PluginManager?.Dispose(); // before: SessionManager, logStream, PluginManager = null; WebManager?.Dispose(); // before: logStream, WebManager = null; Database?.Dispose(); // before: logStream, Database = null; FactoryManager?.Dispose(); // before: FactoryManager = null; TickPool.Close(); }