fix: correctly use dependency order to unload, declare all plugin services as deps to PM

This commit is contained in:
goat 2023-03-08 22:37:44 +01:00
parent af670d6b11
commit f032adb155
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
4 changed files with 222 additions and 26 deletions

View file

@ -32,14 +32,14 @@ namespace Dalamud.Plugin.Internal;
/// <summary>
/// Class responsible for loading and unloading plugins.
/// NOTE: ALL plugin exposed services are marked as dependencies for PluginManager in Service{T}.
/// </summary>
[ServiceManager.EarlyLoadedService]
#pragma warning disable SA1015
// DalamudTextureWrap registers textures to dispose with IM
[InherentDependency<InterfaceManager.InterfaceManagerWithScene>]
// DalamudPluginInterface asks to remove chat link handlers
[InherentDependency<ChatGui>]
// DalamudTextureWrap registers textures to dispose with IM
[InherentDependency<InterfaceManager>]
#pragma warning restore SA1015
internal partial class PluginManager : IDisposable, IServiceType
{