internal static void Dispose() { if (!Initialized) { return; } Initialized = false; Manager.Dispose(); HookEndpointManager.OnGenerateCecilModule -= GenerateCecilModule; HookOnUnloadContent.Dispose(); HookOnUnloadAll.Dispose(); HookOnLogSilentException?.Dispose(); }
internal static void Dispose() { if (!Initialized) { return; } Initialized = false; Mods.Clear(); OwnedDetourLists.Clear(); HookEndpointManager.OnGenerateCecilModule -= GenerateCecilModule; Detour.OnDetour -= RegisterDetour; Detour.OnUndo -= UnregisterDetour; NativeDetour.OnDetour -= RegisterNativeDetour; NativeDetour.OnUndo -= UnregisterDetour; HookOnUnloadContent.Dispose(); HookOnUnloadAll.Dispose(); }