联机内存回收

This commit is contained in:
ZouJin 2024-03-19 21:25:35 +08:00
parent 14a09d1eb8
commit e3f2c51c4d
2 changed files with 15 additions and 1 deletions

View File

@ -398,6 +398,20 @@ public partial class MPFriends : WindowX
}
private void WindowX_Closed(object sender, EventArgs e)
{
if (Core != null && Core.Graph != null)
{
foreach (var igs in Core.Graph.GraphsList.Values)
{
foreach (var ig2 in igs.Values)
{
foreach (var ig3 in ig2)
{
ig3.Stop();
}
}
}
}
Main?.Dispose();
mw.Windows.Remove(this);
}
private void tbTalk_KeyDown(object sender, KeyEventArgs e)

View File

@ -203,7 +203,7 @@ public partial class winMutiPlayer : Window
private void Main_GraphDisplayHandler(GraphInfo info)
{
if (info.Type == GraphType.Shutdown || info.Type == GraphType.Common || info.Type == GraphType.Move
|| info.Type == GraphType.Raised_Dynamic || info.Type == GraphType.Raised_Static)
|| info.Type == GraphType.Raised_Dynamic || info.Type == GraphType.Raised_Static || info.Type == GraphType.Say)
{
return;
}