diff --git a/Capy64/Runtime/ObjectManager.cs b/Capy64/Runtime/ObjectManager.cs index bd80b3c..680254d 100644 --- a/Capy64/Runtime/ObjectManager.cs +++ b/Capy64/Runtime/ObjectManager.cs @@ -76,6 +76,12 @@ public class ObjectManager : IPlugin private void OnClose(object sender, EventArgs e) { + foreach (var pair in _objects) + { + if (pair.Value is IDisposable disposable) + disposable.Dispose(); + } + _objects.Clear(); } }