Improvements (#903)

This commit is contained in:
kizer 2022-06-29 18:51:40 +09:00 committed by GitHub
parent e9cd7e0273
commit 716736f022
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 1809 additions and 872 deletions

View file

@ -359,6 +359,7 @@ namespace Dalamud.Game
/// </summary>
public void Dispose()
{
this.Save();
Marshal.FreeHGlobal(this.moduleCopyPtr);
}
@ -370,7 +371,14 @@ namespace Dalamud.Game
if (this.cacheFile == null)
return;
File.WriteAllText(this.cacheFile.FullName, JsonConvert.SerializeObject(this.textCache));
try
{
File.WriteAllText(this.cacheFile.FullName, JsonConvert.SerializeObject(this.textCache));
}
catch (Exception e)
{
Log.Warning(e, "Failed to save cache to {0}", this.cacheFile);
}
}
/// <summary>