/// <summary> /// Clean up. /// </summary> public override void Dispose() { if (crashSound != null) { crashSound.Stop(); crashSound.Dispose(); crashSound = null; } if (engineSound != null) { engineSound.Stop(); engineSound.Dispose(); engineSound = null; } if (rotorSound != null) { rotorSound.Stop(); rotorSound.Dispose(); rotorSound = null; } if (Mesh != null) { Mesh.Dispose(); Mesh = null; } base.Dispose(); }
/// <summary> /// Clean up. /// </summary> public void Dispose() { Bonsai.Utils.Settings.SettingsChanged -= new Bonsai.Utils.Settings.SettingsEventHandler(Settings_SettingsChanged); if (sound != null) { sound.Stop(); sound.Dispose(); sound = null; } }