/// <summary> /// Detaches the SmoothStreamingMediaElement from the diagnostic component. /// It is recommended that you do not call this directly and instead use DetachFromSMF /// </summary> internal void DetachFromMediaElement() { ssme.Unloaded -= ssme_Unloaded; if (healthMonitor != null) { healthMonitor.Flush(); } healthMonitorLogger.DetachMonitor(); if (healthMonitor != null) { healthMonitor.Detach(); healthMonitor = null; } ssme = null; IsAttached = false; }