Fixed the issue that crash when close.

This commit is contained in:
2026-03-29 01:13:51 +09:00
parent 3aef53cad9
commit b5d8009bec
12 changed files with 90 additions and 30 deletions

View File

@@ -1,6 +1,5 @@
using Ghost.Editor.Core.Utilities;
using Ghost.Editor.Models;
using Ghost.Engine;
using Misaki.HighPerformance.LowLevel.Buffer;
using System.Reflection;
@@ -52,7 +51,7 @@ internal static class ActivationHandler
return arguments;
}
public static async Task HandleAsync(LaunchArguments args)
public static ValueTask HandleAsync(LaunchArguments args)
{
var opts = new AllocationManagerInitOpts
{
@@ -62,16 +61,18 @@ internal static class ActivationHandler
};
AllocationManager.Initialize(opts);
await Task.Run(() =>
{
TypeCache.Init();
App.GetService<EngineCore>();
});
TypeCache.Initialize();
// await ((Core.AssetHandle.AssetService)App.GetService<IAssetService>()).Init();
// TODO: Init other subsystems here.
// await Task.Delay(10000); // Wait 10 seconds to simulate work.
return ValueTask.CompletedTask;
}
public static void Shutdown()
{
AllocationManager.Dispose();
}
}