protected virtual void Dispose(bool disposing) { if (!IsDisposed) { if (Disposing != null) { Disposing.Invoke(this, null); } foreach (SoundEffect se in INTERNAL_sounds) { if (se != null) { se.Dispose(); } } INTERNAL_baseEngine.INTERNAL_removeWaveBank(INTERNAL_name); INTERNAL_sounds = null; if (INTERNAL_waveBankReader != null) { INTERNAL_waveBankReader.Close(); INTERNAL_waveBankReader = null; } IsDisposed = true; IsPrepared = false; } }