protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { // Always dispose this first to ensure updates aren't happening while the project is being disposed effectUpdateQueue.Dispose(); mapsetManager?.Dispose(); scriptManager.Dispose(); textureContainer.Dispose(); audioContainer.Dispose(); } mapsetManager = null; effectUpdateQueue = null; scriptManager = null; textureContainer = null; audioContainer = null; disposedValue = true; } }
protected virtual void Dispose(bool disposing) { if (!IsDisposed) { if (disposing) { // Always dispose this first to ensure updates aren't happening while the project is being disposed effectUpdateQueue.Dispose(); assetWatcher.Dispose(); MapsetManager?.Dispose(); scriptManager.Dispose(); TextureContainer.Dispose(); AudioContainer.Dispose(); } assetWatcher = null; MapsetManager = null; effectUpdateQueue = null; scriptManager = null; TextureContainer = null; AudioContainer = null; IsDisposed = true; } }