diff --git a/src/SlatedGameToolkit.Framework/GameEngine.cs b/src/SlatedGameToolkit.Framework/GameEngine.cs index 7fbe809..14cf610 100644 --- a/src/SlatedGameToolkit.Framework/GameEngine.cs +++ b/src/SlatedGameToolkit.Framework/GameEngine.cs @@ -96,7 +96,7 @@ namespace SlatedGameToolkit.Framework { timePassedFromLastRender = 0; } } - manager.Dispose(); + manager.removeAllStates(); stopped = true; SDL.SDL_Quit(); logger.Information("Game engine has stopped."); diff --git a/src/SlatedGameToolkit.Framework/StateSystem/Manager.cs b/src/SlatedGameToolkit.Framework/StateSystem/Manager.cs index 0bcff20..d4014c9 100644 --- a/src/SlatedGameToolkit.Framework/StateSystem/Manager.cs +++ b/src/SlatedGameToolkit.Framework/StateSystem/Manager.cs @@ -5,7 +5,7 @@ using SlatedGameToolkit.Framework.StateSystem.States; namespace SlatedGameToolkit.Framework.StateSystem { - public sealed class Manager : IDisposable { + public sealed class Manager { public Thread thread; private IState currentState; private IState nextState; @@ -114,17 +114,5 @@ namespace SlatedGameToolkit.Framework.StateSystem removeState(state); } } - - /// - /// Disposes of this manager. - /// - public void Dispose() - { - removeAllStates(); - } - - ~Manager() { - Dispose(); - } } } \ No newline at end of file