Fixed the issue that crash when close.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user