public void Dispose() { ServiceManager.PlaybackController.Transition -= OnPlaybackControllerTransition; ServiceManager.PlaybackController.TrackStarted -= OnPlaybackControllerTrackStarted; ServiceManager.PlayerEngine.DisconnectEvent(OnTrackInfoUpdated); if (now_playing_interface != null) { now_playing_interface.Destroy(); now_playing_interface.Dispose(); now_playing_interface = null; } }