fix objectdb leaks on exit

This commit is contained in:
Matt Parker
2025-10-01 00:44:45 +10:00
parent ee06bd8497
commit 854b14ba24
5 changed files with 21 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
using Ardalis.GuardClauses;
using Godot;
using Microsoft.Build.Locator;
using Microsoft.Extensions.Hosting;
using SharpIDE.Application.Features.Events;
using SharpIDE.Godot.Features.SlnPicker;
namespace SharpIDE.Godot;
@@ -26,6 +26,16 @@ public partial class IdeWindow : Control
PickSolution(true);
}
// public override void _ExitTree()
// {
// GodotGlobalEvents.Instance = null!;
// GlobalEvents.Instance = null!;
// GC.Collect();
// GC.WaitForPendingFinalizers();
// GC.Collect();
// PrintOrphanNodes();
// }
public void PickSolution(bool fullscreen = false)
{
if (_slnPicker is not null) throw new InvalidOperationException("Solution picker is already active");