private void SamplePage_Unloaded(object sender, Windows.UI.Xaml.RoutedEventArgs e) { if (_imageMaskSurface != null) { _imageMaskSurface.Dispose(); } if (_imageLoader != null) { _imageLoader.Dispose(); } }
/// <summary> /// Cleanup our resources and stop video playback. /// </summary> public void Cleanup() { if (_mediaPlayer != null) { _mediaPlayer.Dispose(); } if (_videoSurface != null) { _videoSurface.Dispose(); } if (_circleSurface != null) { _imageLoader.Dispose(); _circleSurface.Dispose(); } }
/// <summary> /// Cleans up any remaining surfaces. /// </summary> public void DisposeSurfaces() { _circleMaskSurface.Dispose(); }