protected virtual void Dispose(bool disposing) { if (disposing) { if (Ssp != null) { Ssp.Dispose(); } if (Asp != null) { Asp.Dispose(); } if (Bsp != null) { Bsp.Dispose(); } if (FATEsp != null) { FATEsp.Dispose(); } if (hunts != null) { hunts.Dispose(); } Ssp = Asp = Bsp = FATEsp = null; if (cts != null) { cts.Dispose(); } cts = null; dispatcherTimer1s.Stop(); trayIcon.Dispose(); if (hunts != null) { FFXIVHunts.Http.Dispose(); hunts.Dispose(); } if (Program.mem != null) { Program.mem.Dispose(); } if (PersistentNamedPipeServer.Instance.IsConnected) { PersistentNamedPipeServer.Instance.Disconnect(); } PersistentNamedPipeServer.Instance.Dispose(); Settings.Default.Save(); } }
protected virtual void Dispose(bool disposing) { if (disposing) { dispatcherTimer1s.Stop(); foreach (KeyValuePair <HuntRank, AudioFileReader> s in sounds) { if (s.Value != null) { s.Value.Dispose(); } } if (hunts != null) { hunts.Dispose(); } sounds.Clear(); if (cts != null) { cts.Dispose(); } cts = null; trayIcon.Dispose(); if (hunts != null) { FFXIVHunts.Http.Dispose(); hunts.Dispose(); } if (Program.mem != null) { Program.mem.Dispose(); } if (PersistentNamedPipeServer.Instance.IsConnected) { PersistentNamedPipeServer.Instance.Disconnect(); } PersistentNamedPipeServer.Instance.Dispose(); Settings.Default.Save(); } }