fix.修复c#退出时不释放asst实例的问题

https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/855
This commit is contained in:
MistEO
2022-06-12 18:51:52 +08:00
parent 11f41b9005
commit 65a1ea5354

View File

@@ -74,6 +74,14 @@ namespace MeoAsstGui
_callback = CallbackFunction;
}
~AsstProxy()
{
if (_handle != IntPtr.Zero)
{
AsstDestroy();
}
}
public void Init()
{
bool loaded = AsstLoadResource(System.IO.Directory.GetCurrentDirectory());
@@ -809,6 +817,11 @@ namespace MeoAsstGui
{
return AsstStop(_handle);
}
public void AsstDestroy()
{
AsstDestroy(_handle);
}
}
public enum AsstMsg