diff --git a/TShockAPI/Log.cs b/TShockAPI/Log.cs index 6e158927..3096e765 100644 --- a/TShockAPI/Log.cs +++ b/TShockAPI/Log.cs @@ -131,6 +131,14 @@ namespace TShockAPI Write(message, LogLevel.Debug); } + /// + /// Disposes objects that are being used. + /// + public static void Dispose() + { + _logWriter.Dispose(); + } + /// /// Internal method which writes a message directly to the log file. /// diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 617d2e56..895a70ca 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -309,6 +309,7 @@ namespace TShockAPI File.Delete(Path.Combine(SavePath, "tshock.pid")); } RestApi.Dispose(); + Log.Dispose(); } base.Dispose(disposing);